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.
ansible/test/integration/targets/test_infra/test_test_infra.yml

26 lines
551 B
YAML

- 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)