You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
734 B
YAML
39 lines
734 B
YAML
|
|
- name: integration/action/remote_file_exists.yml
|
|
hosts: test-targets
|
|
any_errors_fatal: true
|
|
tasks:
|
|
|
|
- file:
|
|
path: /tmp/does-not-exist
|
|
state: absent
|
|
|
|
- action_passthrough:
|
|
method: _remote_file_exists
|
|
args: ['/tmp/does-not-exist']
|
|
register: out
|
|
|
|
- assert:
|
|
that: out.result == False
|
|
fail_msg: out={{out}}
|
|
|
|
# ---
|
|
|
|
- copy:
|
|
dest: /tmp/does-exist
|
|
content: "I think, therefore I am"
|
|
|
|
- action_passthrough:
|
|
method: _remote_file_exists
|
|
args: ['/tmp/does-exist']
|
|
register: out
|
|
|
|
- assert:
|
|
that: out.result == True
|
|
fail_msg: out={{out}}
|
|
|
|
- file:
|
|
path: /tmp/does-exist
|
|
state: absent
|
|
|