Debian Codegraph @

test/integration/targets/handlers/from_handlers.yml

raw
1 - name: verify handlers_from on include_role
2 hosts: A
3 gather_facts: False
4 tags: ['scenario1']
5 tasks:
6 - name: test include_role
7 include_role: name=test_handlers_meta handlers_from=alternate.yml
8
9 - name: force handler run
10 meta: flush_handlers
11
12 - name: verify handlers ran
13 assert:
14 that:
15 - "'handler1_alt_called' in hostvars[inventory_hostname]"
16 - "'handler2_alt_called' in hostvars[inventory_hostname]"
17 tags: ['scenario1']
18
19
20 - name: verify handlers_from on import_role
21 hosts: A
22 gather_facts: False
23 tasks:
24 - name: set facts to false
25 set_fact:
26 handler1_alt_called: False
27 handler2_alt_called: False
28
29 - import_role: name=test_handlers_meta handlers_from=alternate.yml
30
31 - name: force handler run
32 meta: flush_handlers
33
34 - name: verify handlers ran
35 assert:
36 that:
37 - handler1_alt_called|bool
38 - handler2_alt_called|bool
39 tags: ['scenario1']