2015-04-04 22:37:14 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# We notify for A and B, and hosts B and C fail.
|
|
|
|
# When forcing, we expect A and B to run handlers
|
|
|
|
# When not forcing, we expect only B to run handlers
|
|
|
|
|
|
|
|
- name: notify the handler for host A and B
|
|
|
|
shell: echo
|
|
|
|
notify:
|
|
|
|
- echoing handler
|
|
|
|
when: inventory_hostname == 'A' or inventory_hostname == 'B'
|
|
|
|
|
2016-05-27 21:28:13 +02:00
|
|
|
- name: EXPECTED FAILURE fail task for all
|
2015-04-04 22:37:14 +02:00
|
|
|
fail: msg="Fail All"
|
|
|
|
when: fail_all is defined and fail_all
|
|
|
|
|
2016-05-27 21:28:13 +02:00
|
|
|
- name: EXPECTED FAILURE fail task for A
|
2015-04-04 22:37:14 +02:00
|
|
|
fail: msg="Fail A"
|
|
|
|
when: inventory_hostname == 'A'
|
|
|
|
|
2016-05-27 21:28:13 +02:00
|
|
|
- name: EXPECTED FAILURE fail task for C
|
2015-04-04 22:37:14 +02:00
|
|
|
fail: msg="Fail C"
|
|
|
|
when: inventory_hostname == 'C'
|
|
|
|
|
|
|
|
- name: echo after A and C have failed
|
|
|
|
command: echo CALLED_TASK_{{ inventory_hostname }}
|