diff options
author | Martin Krizek <martin.krizek@gmail.com> | 2024-07-04 09:19:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 09:19:56 +0200 |
commit | 571e2a9551de1a5161d8c7507ef1d62d2f78e1cc (patch) | |
tree | 9d46ebab58ab237a827f1b15af1c614db0942e73 /test | |
parent | hostvars templating fix, override serialization (#83509) (diff) | |
download | ansible-571e2a9551de1a5161d8c7507ef1d62d2f78e1cc.tar.xz ansible-571e2a9551de1a5161d8c7507ef1d62d2f78e1cc.zip |
Fix incorrect rc when executing end_host in rescue (#83522)
Fixes #83447
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/targets/meta_tasks/runme.sh | 3 | ||||
-rw-r--r-- | test/integration/targets/meta_tasks/test_end_host_rescue_rc.yml | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/targets/meta_tasks/runme.sh b/test/integration/targets/meta_tasks/runme.sh index f7d8d8973f..feb51ae88a 100755 --- a/test/integration/targets/meta_tasks/runme.sh +++ b/test/integration/targets/meta_tasks/runme.sh @@ -76,3 +76,6 @@ done # test refresh ansible-playbook -i inventory_refresh.yml refresh.yml "$@" ansible-playbook -i inventory_refresh.yml refresh_preserve_dynamic.yml "$@" + +# test rc when end_host in the rescue section +ANSIBLE_FORCE_HANDLERS=0 ansible-playbook test_end_host_rescue_rc.yml diff --git a/test/integration/targets/meta_tasks/test_end_host_rescue_rc.yml b/test/integration/targets/meta_tasks/test_end_host_rescue_rc.yml new file mode 100644 index 0000000000..c2faa171b3 --- /dev/null +++ b/test/integration/targets/meta_tasks/test_end_host_rescue_rc.yml @@ -0,0 +1,7 @@ +- hosts: localhost + gather_facts: false + tasks: + - block: + - fail: + rescue: + - meta: end_host |