Debian Codegraph @

test/integration/targets/roles/role_complete.yml

raw
1 - name: test deduping allows for 1 successful execution of role after it is skipped
2 hosts: testhost
3 gather_facts: false
4 tags: [ 'conditional_skipped' ]
5 roles:
6 # Skipped the first time it executes
7 - role: a
8 when: role_set_var is defined
9
10 - role: set_var
11
12 # No longer skipped
13 - role: a
14 when: role_set_var is defined
15 # Deduplicated with the previous success
16 - role: a
17 when: role_set_var is defined
18
19 - name: test deduping allows for successful execution of role after host is unreachable
20 hosts: fake,testhost
21 gather_facts: false
22 tags: [ 'unreachable' ]
23 ignore_unreachable: yes
24 roles:
25 # unreachable by the first host
26 - role: test_connectivity
27
28 # unreachable host will try again,
29 # the successful host will not because it's deduplicated
30 - role: test_connectivity
31
32 - name: test deduping role for failed host
33 hosts: testhost,localhost
34 gather_facts: false
35 tags: [ 'conditional_failed' ]
36 ignore_errors: yes
37 roles:
38 # Uses run_once to fail on the first host the first time it executes
39 - role: failed_when
40
41 - role: set_var
42 - role: recover
43
44 # Deduplicated after the failure, ONLY runs for localhost
45 - role: failed_when
46 # Deduplicated with the previous success
47 - role: failed_when