2016-03-10 02:36:39 +01:00
|
|
|
- hosts: testhost
|
|
|
|
gather_facts: no
|
2016-03-10 16:49:44 +01:00
|
|
|
tags:
|
|
|
|
- always
|
|
|
|
tasks:
|
2016-03-18 16:50:07 +01:00
|
|
|
- name: ensure fail action produces a failing result
|
|
|
|
fail:
|
2016-03-10 02:36:39 +01:00
|
|
|
ignore_errors: yes
|
|
|
|
register: fail_out
|
|
|
|
|
|
|
|
- debug:
|
|
|
|
msg: fail works ({{ fail_out.failed }})
|
|
|
|
|
2016-03-18 16:50:07 +01:00
|
|
|
- name: ensure assert produces a failing result
|
|
|
|
assert:
|
2016-03-10 02:36:39 +01:00
|
|
|
that: false
|
|
|
|
ignore_errors: yes
|
|
|
|
register: assert_out
|
|
|
|
|
|
|
|
- debug:
|
2016-03-10 16:49:44 +01:00
|
|
|
msg: assert works ({{ assert_out.failed }})
|
2016-03-10 02:36:39 +01:00
|
|
|
|
2016-05-27 21:28:13 +02:00
|
|
|
- name: EXPECTED FAILURE ensure fail action stops execution
|
2016-03-18 16:50:07 +01:00
|
|
|
fail:
|
|
|
|
msg: fail actually failed (this is expected)
|