2014-03-25 18:32:11 +01:00
|
|
|
---
|
|
|
|
- name: run handlers
|
|
|
|
hosts: A
|
|
|
|
gather_facts: False
|
|
|
|
connection: local
|
|
|
|
roles:
|
|
|
|
- { role: test_handlers_meta }
|
|
|
|
|
|
|
|
- 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]"
|
|
|
|
|
2014-05-27 17:55:09 +02:00
|
|
|
- name: test handlers
|
|
|
|
hosts: testgroup
|
|
|
|
gather_facts: False
|
|
|
|
connection: local
|
|
|
|
roles:
|
|
|
|
- { role: test_handlers }
|