blob: dafa9ceebe62bff44bf8f95aaa81e007220e00b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
- name: run handlers
hosts: A
gather_facts: False
connection: local
roles:
- { role: test_handlers_meta, tags: ['scenario1'] }
- name: verify final handler was run
hosts: A
gather_facts: False
connection: local
tasks:
- name: verify handler2 ran
assert:
that:
- "not hostvars[inventory_hostname]['handler1_called']"
- "'handler2_called' in hostvars[inventory_hostname]"
tags: ['scenario1']
- name: test handlers
hosts: testgroup
gather_facts: False
connection: local
roles:
- { role: test_handlers }
|