1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/test_handlers.yml
James Cammarata cfd8c685d1 Correct issue of handlers running on all hosts incorrectly
Also adds an integration test to catch this bug in the future.

Fixes #7559
2014-05-27 12:03:08 -05:00

25 lines
536 B
YAML

---
- 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]"
- name: test handlers
hosts: testgroup
gather_facts: False
connection: local
roles:
- { role: test_handlers }