mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
551 B
YAML
26 lines
551 B
YAML
9 years ago
|
- hosts: testhost
|
||
|
gather_facts: no
|
||
9 years ago
|
tags:
|
||
|
- always
|
||
|
tasks:
|
||
9 years ago
|
- name: ensure fail action produces a failing result
|
||
|
fail:
|
||
9 years ago
|
ignore_errors: yes
|
||
|
register: fail_out
|
||
|
|
||
|
- debug:
|
||
|
msg: fail works ({{ fail_out.failed }})
|
||
|
|
||
9 years ago
|
- name: ensure assert produces a failing result
|
||
|
assert:
|
||
9 years ago
|
that: false
|
||
|
ignore_errors: yes
|
||
|
register: assert_out
|
||
|
|
||
|
- debug:
|
||
9 years ago
|
msg: assert works ({{ assert_out.failed }})
|
||
9 years ago
|
|
||
9 years ago
|
- name: EXPECTED FAILURE ensure fail action stops execution
|
||
9 years ago
|
fail:
|
||
|
msg: fail actually failed (this is expected)
|