Debian Codegraph @

test/integration/targets/wait_for_connection/tasks/main.yml

raw
1 - name: Test normal connection to target node
2 wait_for_connection:
3 connect_timeout: 5
4 sleep: 1
5 timeout: 10
6
7 - name: Test normal connection to target node with delay
8 wait_for_connection:
9 connect_timeout: 5
10 sleep: 1
11 timeout: 10
12 delay: 3
13 register: result
14
15 - name: Verify delay was honored
16 assert:
17 that:
18 - result.elapsed >= 3
19
20 - name: Use invalid parameter
21 wait_for_connection:
22 foo: bar
23 ignore_errors: yes
24 register: invalid_parameter
25
26 - name: Ensure task fails with error
27 assert:
28 that:
29 - invalid_parameter is failed
30 - "invalid_parameter.msg == 'Invalid options for wait_for_connection: foo'"
31
32 - name: Test local connection with wait_for_connection
33 command: ansible localhost -m wait_for_connection
34 delegate_to: localhost
35 register: local_wait_for_connection
36
37 - name: Assert reset is a no-op rather than unimplemented
38 assert:
39 that: unexpected_warning not in local_wait_for_connection.stderr
40 vars:
41 unexpected_warning: "Reset is not implemented for this connection"