summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/test_infra/test_test_infra.yml
blob: 706f9b8fca2c10a1390a196fba1629d6be4ef89e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- hosts: testhost
  gather_facts: no
  tags:
    - always
  tasks:
  - name: ensure fail action produces a failing result
    fail:
    ignore_errors: yes
    register: fail_out

  - debug:
      msg: fail works ({{ fail_out.failed }})

  - name: ensure assert produces a failing result
    assert:
      that: false
    ignore_errors: yes
    register: assert_out

  - debug:
      msg: assert works ({{ assert_out.failed }})

  - name: EXPECTED FAILURE ensure fail action stops execution
    fail:
      msg: fail actually failed (this is expected)