You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/blocks/unsafe_failed_task.yml

18 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"