summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2024-07-04 09:19:56 +0200
committerGitHub <noreply@github.com>2024-07-04 09:19:56 +0200
commit571e2a9551de1a5161d8c7507ef1d62d2f78e1cc (patch)
tree9d46ebab58ab237a827f1b15af1c614db0942e73 /test
parenthostvars templating fix, override serialization (#83509) (diff)
downloadansible-571e2a9551de1a5161d8c7507ef1d62d2f78e1cc.tar.xz
ansible-571e2a9551de1a5161d8c7507ef1d62d2f78e1cc.zip
Fix incorrect rc when executing end_host in rescue (#83522)
Fixes #83447
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/targets/meta_tasks/runme.sh3
-rw-r--r--test/integration/targets/meta_tasks/test_end_host_rescue_rc.yml7
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