Debian Codegraph @

test/integration/targets/ignore_unreachable/test_cannot_connect.yml

raw
1 - hosts: nonexistent
2 ignore_unreachable: true
3 gather_facts: false
4 tasks:
5 - name: Hi
6 ping:
7 - name: This should print anyway
8 debug:
9 msg: This should print worked even though host was unreachable
10 - name: Hi
11 ping:
12 register: should_fail
13
14 - hosts: localhost
15 gather_facts: no
16 tasks:
17 - meta: clear_host_errors
18
19 - assert:
20 that:
21 - hostvars.nonexistent.should_fail is unreachable
22 - hostvars.nonexistent.should_fail is not skipped
23 - hostvars.nonexistent.should_fail is not failed