summaryrefslogtreecommitdiff
path: root/test/integration/test_test_infra.yml
blob: 13c570530a801f6d568e1e34a12d52f6a3638663 (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
26
- 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)