mirror of https://github.com/ansible/ansible.git
Fixes #71306
(cherry picked from commit 9792d631b1
)
pull/71334/head
parent
3be597419d
commit
724b3648ea
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- Fix an exit code for a non-failing playbook (https://github.com/ansible/ansible/issues/71306)
|
@ -0,0 +1,16 @@
|
|||||||
|
- hosts: all
|
||||||
|
gather_facts: no
|
||||||
|
tasks:
|
||||||
|
- block:
|
||||||
|
- block:
|
||||||
|
- block:
|
||||||
|
- name: EXPECTED FAILURE
|
||||||
|
fail:
|
||||||
|
when: ansible_host == "host1"
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
msg: "I am successful!"
|
||||||
|
run_once: true
|
||||||
|
rescue:
|
||||||
|
- debug:
|
||||||
|
msg: "Attemp 1 failed!"
|
Loading…
Reference in New Issue