summaryrefslogtreecommitdiff
path: root/test/integration/targets/blocks/unsafe_failed_task.yml
blob: e74327b9f8703d1e7ff05a5d265a0c403e783a51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- 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"