* Can be either 'installed', 'removed', or 'latest'. The default is 'installed'. (In 0.4 and later, the aliases 'absent' and 'present' can also be used. They correspond with 'removed' and 'installed')
* A directory to save the file into. For example, if the 'dest' directory is '/foo', a src file named '/tmp/bar' on host 'host.example.com', would be saved into '/foo/host.example.com/tmp/bar' (in Ansible 0.0.3 and later).
* alias for 'path'. Sets an absolute path to a file on the filesystem when used with 'state=file'. When used with 'state=link', sets the destination to create a symbolic link defined by 'src' key.
* either 'file', 'link', 'directory', or 'absent'. The default is 'file'. If 'directory', the directory and all immediate subdirectories will be created if they do not exist. If 'file', the file will NOT be created if it does not exist, specify `copy` or `template` for the module name instead if you need to put content at the specified location. If 'link', the symbolic link will be created or changed. If 'absent', directories will be recursively deleted, and files or symlinks will be unlinked.
* 'user' part of SELinux file context. Will default to what is provided by system policy, if available. Only used on systems with SELinux present. If you specify '_default', it will use the 'user' portion of default context from the policy if available.
* 'role' part of SELinux file context. Will default to what is provided by system policy, if available. Only used on systems with SELinux present. If you specify '_default', it will use the 'role' portion of default context from the policy if available.
* 'type' part of SELinux file context. Will default to what is provided by system policy, if available. Only used on systems with SELinux present. If you specify '_default', it will use the 'type' portion of default context from the policy if available.
* 'level' part of SELinux file context. This is the MLS and MCS attribute of the file context, also sometimes known as the 'range'. It defaults to 's0'. Only used only used on hosts with SELinux present. If you specify '_default', it will use the 'level' portion of default context from the policy if available.
* accepts only 'default' as value. This will restore a file's selinux context to the default context in the policy. Does nothing if no default is available. Only used on hosts with SELinux present.
* (new in 0.4) Indicates the group (when being created), should be a system group. This does not allow changing groups from and to system groups. Value is 'yes' or 'no', default is 'no'.
* (new in 0.4) When used with the value 'status', returns the status of the service along with other results. This is primarily useful for /usr/bin/ansible, and not meaningful for playbooks.
* Arbitrary variable names, which must be a mix of alphanumeric characters and underscores, can also be defined. Setting a variable creates a ``key=value`` pair in the JSON file for use in templating.
* Sets the user's password to this crypted value. Pass in a result from crypt. See the users example in the github examples directory for what this looks like in a playbook.
* Defaults to 'present'. When 'absent', the user account will be removed if present. Optionally additional removal behaviors can be set with the 'force' or 'remove' parameter values (see below).
* (new in 0.4) Indicates the user (when being created), should be a system account. This does not allow changing users from and to system accounts. Value is 'yes' or 'no', default is 'no'.
* When used with a state of 'absent', the behavior denoted in the 'userdel' manpage for ``--force`` is also used when removing the user. Value is 'yes' or 'no', default is 'no'.
* When used with a state of 'absent', the behavior denoted in the 'userdel' manpage for ``--remove`` is also used when removing the user. Value is 'yes' or 'no', default is 'no'.
Manages virtual machines supported by libvirt. Requires that libvirt be installed
on the managed machine.
*guest*:
* The name of the guest VM being managed
*state*
* Desired state of the VM. Either `running`, `shutdown`, `destroyed`, or `undefined`. Note that there may be some lag for state requests like 'shutdown', and these states only refer to the virtual machine states. After starting a guest, the guest OS may not be immediately accessible.
*command*:
* In addition to state management, various non-idempotent commands are available for API and script usage (but don't make much sense in a playbook). These mostly return information, though some also affect state. See examples below.
Example action from Ansible :doc:`playbooks`::
virt guest=alpha state=running
virt guest=alpha state=shutdown
virt guest=alpha state=destroyed
virt guest=alpha state=undefined
Example guest management commands from /usr/bin/ansible::
ansible host -m virt -a "guest=foo command=status"
ansible host -m virt -a "guest=foo command=pause"
ansible host -m virt -a "guest=foo command=unpause"
ansible host -m virt -a "guest=foo command=get_xml"
ansible host -m virt -a "guest=foo command=autostart"
Example host (hypervisor) management commands from /usr/bin/ansible::
* Can be either 'installed', 'latest', or 'removed'. The default is 'installed'. (In 0.4 and later, the aliases 'absent' and 'present' can also be used. They correspond with 'removed' and 'installed')