mirror of https://github.com/ansible/ansible.git
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.
27 lines
679 B
YAML
27 lines
679 B
YAML
4 years ago
|
- 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
|