Ansible API Documentation¶
The Ansible API is under construction. These stub references for attributes, classes, functions, methods, and modules will be documented in future.
The module utilities included in ansible.module_utils.basic
and AnsibleModule
are documented under Reference & Appendices.
Attributes¶
-
AnsibleModule.
params
¶
The parameters accepted by the module.
-
ansible.module_utils.basic.
ANSIBLE_VERSION
¶
-
ansible.module_utils.basic.
SELINUX_SPECIAL_FS
¶
Deprecated in favor of ansibleModule._selinux_special_fs.
-
AnsibleModule.
ansible_version
¶
-
AnsibleModule.
_debug
¶
-
AnsibleModule.
_diff
¶
-
AnsibleModule.
no_log
¶
-
AnsibleModule.
_selinux_special_fs
¶
(formerly ansible.module_utils.basic.SELINUX_SPECIAL_FS)
-
AnsibleModule.
_syslog_facility
¶
-
self.
playbook
¶
-
self.
play
¶
-
self.
task
¶
-
sys.
path
¶
Classes¶
-
``ansible.module_utils.basic.AnsibleModule``
The basic utilities for AnsibleModule.
-
class
AnsibleModule
¶
The main class for an Ansible module.
Methods¶
-
AnsibleModule.
log
()¶
Logs the output of Ansible.
-
AnsibleModule.
debug
()¶
Debugs Ansible.
-
Ansible.
get_bin_path
()¶
Retrieves the path for executables.
-
AnsibleModule.
run_command
()¶
Runs a command within an Ansible module.
-
module.
fail_json
()¶
Exits and returns a failure.
-
module.
exit_json
()¶
Exits and returns output.