Debian Codegraph @

test/integration/targets/unarchive/tasks/test_tar_gz.yml

raw
1 - name: create our tar.gz unarchive destination
2 file:
3 path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
4 state: directory
5
6 - name: unarchive a tar.gz file
7 unarchive:
8 src: '{{remote_tmp_dir}}/test-unarchive.tar.gz'
9 dest: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
10 remote_src: yes
11 register: unarchive02
12
13 - name: verify that the file was marked as changed
14 assert:
15 that:
16 - "unarchive02.changed == true"
17 # Verify that no file list is generated
18 - "'files' not in unarchive02"
19
20 - name: verify that the file was unarchived
21 file:
22 path: '{{remote_tmp_dir}}/test-unarchive-tar-gz/foo-unarchive.txt'
23 state: file
24
25 - name: remove our tar.gz unarchive destination
26 file:
27 path: '{{remote_tmp_dir}}/test-unarchive-tar-gz'
28 state: absent
29
30 - name: test owner/group perms
31 include_tasks: test_owner_group.yml
32 vars:
33 ext: tar.gz
34 archive: test-unarchive.tar.gz
35 testfile: foo-unarchive.txt