Debian Codegraph @

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

raw
1 - name: check if /tmp/foo-unarchive.text exists
2 stat:
3 path: /tmp/foo-unarchive.txt
4 ignore_errors: True
5 register: unarchive04
6
7 - name: fail if the proposed destination file exists for safety
8 fail:
9 msg: /tmp/foo-unarchive.txt already exists, aborting
10 when: unarchive04.stat.exists
11
12 - name: try unarchiving to /tmp
13 unarchive:
14 src: '{{remote_tmp_dir}}/test-unarchive.tar.gz'
15 dest: /tmp
16 remote_src: true
17 register: unarchive05
18
19 - name: verify that the file was marked as changed
20 assert:
21 that:
22 - "unarchive05.changed == true"
23
24 - name: verify that the file was unarchived
25 file:
26 path: /tmp/foo-unarchive.txt
27 state: file
28
29 - name: remove our unarchive destination
30 file:
31 path: /tmp/foo-unarchive.txt
32 state: absent