Ansible API Documentation

The Ansible API is under construction. These stub references will be documented in future.

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

class ansible.module_utils.basic.AnsibleModule

The basic utilities for AnsibleModule.

class AnsibleModule

The main class for an Ansible module.

Functions

ansible.module_utils.basic._load_params()

Load parameters.

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.