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_gz.yml

29 lines
786 B
YAML

- name: create our tar.gz unarchive destination
file:
path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
state: directory
- name: unarchive a tar.gz file
unarchive:
src: '{{remote_tmp_dir}}/test-unarchive.tar.gz'
dest: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
remote_src: yes
register: unarchive02
- name: verify that the file was marked as changed
assert:
that:
- "unarchive02.changed == true"
# Verify that no file list is generated
- "'files' not in unarchive02"
- name: verify that the file was unarchived
file:
path: '{{remote_tmp_dir}}/test-unarchive-tar-gz/foo-unarchive.txt'
state: file
- name: remove our tar.gz unarchive destination
file:
path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
state: absent