mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix --force-handlers, and allow it in plays and ansible.cfg
The --force-handlers command line argument was not correctly running handlers on hosts which had tasks that later failed. This corrects that, and also allows you to specify force_handlers in ansible.cfg or in a play.
This commit is contained in:
28
test/integration/test_force_handlers.yml
Normal file
28
test/integration/test_force_handlers.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
|
||||
- name: test force handlers (default)
|
||||
tags: normal
|
||||
hosts: testgroup
|
||||
gather_facts: False
|
||||
connection: local
|
||||
roles:
|
||||
- { role: test_force_handlers }
|
||||
|
||||
- name: test force handlers (set to true)
|
||||
tags: force_true_in_play
|
||||
hosts: testgroup
|
||||
gather_facts: False
|
||||
connection: local
|
||||
force_handlers: True
|
||||
roles:
|
||||
- { role: test_force_handlers }
|
||||
|
||||
|
||||
- name: test force handlers (set to false)
|
||||
tags: force_false_in_play
|
||||
hosts: testgroup
|
||||
gather_facts: False
|
||||
connection: local
|
||||
force_handlers: False
|
||||
roles:
|
||||
- { role: test_force_handlers }
|
||||
Reference in New Issue
Block a user