You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/unarchive/tasks/test_tar.yml

34 lines
834 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
- name: test owner/group perms
include_tasks: test_owner_group.yml
vars:
ext: tar
archive: test-unarchive.tar
testfile: foo-unarchive.txt