mirror of https://github.com/ansible/ansible.git
Fixes #85682
(cherry picked from commit c5ddc93767)
pull/85788/head
parent
9aea625f63
commit
764070de69
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- The ``ansible_failed_task`` variable is now correctly exposed in a rescue section, even when a failing handler is triggered by the ``flush_handlers`` task in the corresponding ``block`` (https://github.com/ansible/ansible/issues/85682)
|
||||
@ -0,0 +1,16 @@
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- block:
|
||||
- debug:
|
||||
changed_when: true
|
||||
notify: h1
|
||||
|
||||
- meta: flush_handlers
|
||||
rescue:
|
||||
- assert:
|
||||
that:
|
||||
- ansible_failed_task is defined
|
||||
handlers:
|
||||
- name: h1
|
||||
fail:
|
||||
Loading…
Reference in New Issue