blob: 68a0621355d62011899632be37ee0e805e41efb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
- name: create our tar unarchive destination
file:
path: '{{remote_tmp_dir}}/test-unarchive-tar'
state: directory
- name: unarchive a tar file with an invalid option
unarchive:
src: '{{remote_tmp_dir}}/test-unarchive.tar'
dest: '{{remote_tmp_dir}}/test-unarchive-tar'
remote_src: yes
extra_opts:
- "--invalid-éxtra-optら"
ignore_errors: yes
register: unarchive
- name: verify that the invalid option is in the error message
assert:
that:
- "unarchive is failed"
- "unarchive['msg'] is search(msg)"
vars:
msg: "Unable to list files in the archive: /.*/(tar|gtar): unrecognized option '--invalid-éxtra-optら'"
- name: remove our tar unarchive destination
file:
path: '{{remote_tmp_dir}}/test-unarchive-tar'
state: absent
|