New in version 1.3.
parameter | required | default | choices | comments |
---|---|---|---|---|
follow | no | True |
| if yes, dereferences symlinks and sets/gets attributes on symlink target, otherwise acts on symlink itself. |
key | no | None | The name of a specific Extended attribute key to set/retrieve | |
path | yes | None | The full path of the file/object to get the facts of. Before 2.3 this option was only usable as name. aliases: name | |
state | no | read |
| defines which state you want to do. read retrieves the current value for a key (default) present sets name to value , default if value is set all dumps all data keys retrieves all keys absent deletes the key |
value | no | None | The value to set the named name/key to, it automatically sets the state to 'set' |
# Obtain the extended attributes of /etc/foo.conf - xattr: path: /etc/foo.conf # Sets the key 'foo' to value 'bar' - xattr: path: /etc/foo.conf key: user.foo value: bar # Removes the key 'foo' - xattr: path: /etc/foo.conf key: user.foo state: absent
Note
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/xattr_module.html