ansible/test/integration/targets/blocks/unsafe_failed_task.yml
Martin Krizek 664531d7d6
Prevent ansible_failed_task from further templating (#74290)
* Prevent ansible_failed_task from further templating

Fixes #74036

* Add changelog
2021-04-16 05:48:57 +10:00

17 lines
405 B
YAML

- hosts: localhost
gather_facts: false
vars:
- data: {}
tasks:
- block:
- name: template error
debug:
msg: "{{ data.value }}"
rescue:
- debug:
msg: "{{ ansible_failed_task.action }}"
- assert:
that:
- ansible_failed_task.name == "template error"
- ansible_failed_task.action == "debug"