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/targets/handlers/from_handlers.yml
Brian Coca 88c87a3583
added handlers_from (#49220)
* added handlers_from

fixes #46769
2018-12-18 11:28:24 -05:00

41 lines
1 KiB
YAML

- name: verify handlers_from on include_role
hosts: A
gather_facts: False
connection: local
tags: ['scenario1']
tasks:
- name: test include_role
include_role: name=test_handlers_meta handlers_from=alternate.yml
- name: force handler run
meta: flush_handlers
- name: verify handlers ran
assert:
that:
- "'handler1_alt_called' in hostvars[inventory_hostname]"
- "'handler2_alt_called' in hostvars[inventory_hostname]"
tags: ['scenario1']
- name: verify handlers_from on import_role
hosts: A
gather_facts: False
connection: local
tasks:
- name: set facts to false
set_fact:
handler1_alt_called: False
handler2_alt_called: False
- import_role: name=test_handlers_meta handlers_from=alternate.yml
- name: force handler run
meta: flush_handlers
- name: verify handlers ran
assert:
that:
- handler1_alt_called|bool
- handler2_alt_called|bool
tags: ['scenario1']