Debian Codegraph @

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

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