mirror of https://github.com/ansible/ansible.git
Fixes #71306
(cherry picked from commit 9792d631b1
)
pull/71335/head
parent
6b4977e3f4
commit
15f3426971
@ -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