blob: 341b66e709e12ddc105a0e375d58b663f993ea00 (
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
|
---
# same as expanduser & expandvars called on managed host
- command: 'echo {{ remote_tmp_dir }}'
register: echo
- set_fact:
remote_dir_expanded: '{{ echo.stdout }}'
- name: ensure test directory doesn't exist
file:
path: '{{ remote_tmp_dir }}/non/existent/path'
state: absent
- name: destination doesn't exist
uri:
url: 'https://{{ httpbin_host }}/get'
dest: '{{ remote_tmp_dir }}/non/existent/path'
ignore_errors: true
register: ret
- name: check that unexpected failure didn't happen
assert:
that:
- ret is failed
- "not ret.msg.startswith('MODULE FAILURE')"
- '"Could not replace file" in ret.msg'
|