mirror of https://github.com/ansible/ansible
flush_handlers: handle a failure in a nested block with force_handlers (#81572)
Fixes #81532 ci_completepull/82211/head
parent
9c09ed7392
commit
a8b6ef7e7c
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- flush_handlers - properly handle a handler failure in a nested block when ``force_handlers`` is set (http://github.com/ansible/ansible/issues/81532)
|
||||
@ -0,0 +1,19 @@
|
||||
- hosts: A,B
|
||||
gather_facts: false
|
||||
force_handlers: true
|
||||
tasks:
|
||||
- block:
|
||||
- command: echo
|
||||
notify: h
|
||||
|
||||
- meta: flush_handlers
|
||||
rescue:
|
||||
- debug:
|
||||
msg: flush_handlers_rescued
|
||||
always:
|
||||
- debug:
|
||||
msg: flush_handlers_always
|
||||
handlers:
|
||||
- name: h
|
||||
fail:
|
||||
when: inventory_hostname == "A"
|
||||
Loading…
Reference in new issue