1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/any_errors_fatal/always_block.yml
Adrian Likins b20ba105c2 intg tests for 'any_errors_fatal' ()
* start adding intg tests for any_errors_fatal

* updates

* show captured output

flip conditional for on_includes

* cleanup/ci poke

* fix typos

* Add 'EXPECTED FAILURE' to tasks names for expected failures
2018-01-29 15:47:13 -05:00

27 lines
1 KiB
YAML

---
- hosts: testhost
gather_facts: false
any_errors_fatal: true
tasks:
- block:
- name: initial block debug
debug: msg='any_errors_fatal_block, i execute normally'
- name: EXPECTED FAILURE any_errors_fatal, initial block, bin/false to simulate failure
command: /bin/false
- name: after a task that fails I should never execute
debug:
msg: 'any_errors_fatal_block_post_fail ... i never execute, cause ERROR!'
rescue:
- name: any_errors_fatal_rescue_block debug
debug: msg='any_errors_fatal_rescue_block_start ... I caught an error'
- name: EXPECTED FAILURE any_errors_fatal in rescue block, using bin/false to simulate error
command: /bin/false
- name: any_errors_fatal post debug
debug: msg='any_errors_fatal_rescue_block_post_fail ... I also never execute :-('
always:
- name: any errors fatal always block debug
debug: msg='any_errors_fatal_always_block_start'