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