summaryrefslogtreecommitdiff
path: root/test/integration/targets/xattr/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/xattr/tasks/main.yml')
-rw-r--r--test/integration/targets/xattr/tasks/main.yml73
1 files changed, 8 insertions, 65 deletions
diff --git a/test/integration/targets/xattr/tasks/main.yml b/test/integration/targets/xattr/tasks/main.yml
index 8514c444f7..563326b839 100644
--- a/test/integration/targets/xattr/tasks/main.yml
+++ b/test/integration/targets/xattr/tasks/main.yml
@@ -1,68 +1,11 @@
- name: Setup
include: setup.yml
-- name: Set attributes
- xattr:
- path: "{{ test_file }}"
- key: user.foo
- value: bar
- register: xattr_set_result
-
-- name: Get attributes
- xattr:
- path: "{{ test_file }}"
- register: xattr_get_all_result
-
-- name: Get specific attribute
- xattr:
- path: "{{ test_file }}"
- key: user.foo
- register: xattr_get_specific_result
-
-- assert:
- that:
- - "xattr_set_result.changed"
- - "xattr_get_all_result['xattr']['user.foo'] == 'bar'"
- - "not xattr_get_all_result.changed"
- - "xattr_get_specific_result['xattr']['user.foo'] == 'bar'"
- - "not xattr_get_specific_result.changed"
-
-- name: Set attribute again
- xattr:
- path: "{{ test_file }}"
- key: user.foo
- value: bar
- register: xattr_set_again_result
-
-- assert:
- that:
- - "not xattr_set_again_result.changed"
-
-- name: Unset attribute
- xattr:
- path: "{{ test_file }}"
- key: user.foo
- state: absent
- register: xattr_unset_result
-
-- name: get attributes
- xattr:
- path: "{{ test_file }}"
- register: xattr_get_after_unset_result
-
-- assert:
- that:
- - "xattr_unset_result.changed"
- - "xattr_get_after_unset_result['xattr'] == {}"
- - "not xattr_get_after_unset_result.changed"
-
-- name: Unset attribute again
- xattr:
- path: "{{ test_file }}"
- key: user.foo
- state: absent
- register: xattr_unset_result
-
-- assert:
- that:
- - "not xattr_set_again_result.changed" \ No newline at end of file
+- name: Check availability of xattr support
+ command: setfattr -n user.foo {{ test_file }}
+ ignore_errors: yes
+ register: xattr
+
+- name: Test
+ include: test.yml
+ when: xattr is not failed