ansible/test/integration/targets/unarchive/tasks/test_tar.yml

27 lines
679 B
YAML
Raw Normal View History

- 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