summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/blocks/finalized_task.yml
blob: 300401b51c4a33f40010c127f14904a1026c13b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- hosts: localhost
  gather_facts: false
  tasks:
    - block:
        - include_role:
            name: '{{ item }}'
          loop:
            - fail
      rescue:
        - debug:
            msg: "{{ ansible_failed_task.name }}"

        - assert:
            that:
              - ansible_failed_task.name == "Fail"
              - ansible_failed_task.action == "fail"
              - ansible_failed_task.parent is not defined