Adding namespace option into the xattr module (#42755)

* Adding namespace option into the xattr module

* Include namespace into the tests

* Make it backward compatible, remove re and operator module
This commit is contained in:
Jiri Tyr 2018-07-16 18:26:06 +01:00 committed by Brian Coca
commit 92c58e9a66
2 changed files with 42 additions and 17 deletions

View file

@ -13,7 +13,7 @@
- name: Get specific attribute
xattr:
path: "{{ test_file }}"
key: user.foo
key: foo
register: xattr_get_specific_result
- assert:
@ -27,7 +27,8 @@
- name: Set attribute again
xattr:
path: "{{ test_file }}"
key: user.foo
namespace: user
key: foo
value: bar
register: xattr_set_again_result
@ -38,11 +39,11 @@
- name: Unset attribute
xattr:
path: "{{ test_file }}"
key: user.foo
key: foo
state: absent
register: xattr_unset_result
- name: get attributes
- name: Get attributes
xattr:
path: "{{ test_file }}"
register: xattr_get_after_unset_result
@ -56,7 +57,8 @@
- name: Unset attribute again
xattr:
path: "{{ test_file }}"
key: user.foo
namespace: user
key: foo
state: absent
register: xattr_unset_result