mirror of https://github.com/ansible/ansible.git
Detect failure in always block after rescue (#70094)
* Detect failure in always block after rescue Fixes #70000 ci_complete * Add more testspull/70145/head
parent
33e25504ac
commit
0ed5b77377
@ -0,0 +1,13 @@
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- block:
|
||||
- name: EXPECTED FAILURE
|
||||
fail:
|
||||
msg: Failure in block
|
||||
always:
|
||||
- name: EXPECTED FAILURE
|
||||
fail:
|
||||
msg: Failure in always
|
||||
- debug:
|
||||
msg: DID NOT RUN
|
||||
@ -0,0 +1,16 @@
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- block:
|
||||
- name: EXPECTED FAILURE
|
||||
fail:
|
||||
msg: Failure in block
|
||||
rescue:
|
||||
- debug:
|
||||
msg: Rescue
|
||||
always:
|
||||
- name: EXPECTED FAILURE
|
||||
fail:
|
||||
msg: Failure in always
|
||||
- debug:
|
||||
msg: DID NOT RUN
|
||||
@ -0,0 +1,12 @@
|
||||
- hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- block:
|
||||
- name: EXPECTED FAILURE
|
||||
fail:
|
||||
msg: Failure in block
|
||||
always:
|
||||
- debug:
|
||||
msg: Always
|
||||
- debug:
|
||||
msg: DID NOT RUN
|
||||
Loading…
Reference in New Issue