ac5f3f8bef
Add integration tests for unarchiving as unprivileged user Break tasks into separate files for easier reading and maintenance Create a user by specifying a default group of 'staff' for macOS. The user module does not actually remove the user directory on macOS, so explicitly remove it. Put the removal tasks in an always block to ensure they always run Co-authored-by: Philip Douglass <philip.douglass@amadeus.com> Co-authored-by: Sam Doran <sdoran@redhat.com>
26 lines
679 B
YAML
26 lines
679 B
YAML
- name: create our tar unarchive destination
|
|
file:
|
|
path: '{{remote_tmp_dir}}/test-unarchive-tar'
|
|
state: directory
|
|
|
|
- name: unarchive a tar file
|
|
unarchive:
|
|
src: '{{remote_tmp_dir}}/test-unarchive.tar'
|
|
dest: '{{remote_tmp_dir}}/test-unarchive-tar'
|
|
remote_src: yes
|
|
register: unarchive01
|
|
|
|
- name: verify that the file was marked as changed
|
|
assert:
|
|
that:
|
|
- "unarchive01.changed == true"
|
|
|
|
- name: verify that the file was unarchived
|
|
file:
|
|
path: '{{remote_tmp_dir}}/test-unarchive-tar/foo-unarchive.txt'
|
|
state: file
|
|
|
|
- name: remove our tar unarchive destination
|
|
file:
|
|
path: '{{remote_tmp_dir}}/test-unarchive-tar'
|
|
state: absent
|