summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2022-10-06 15:26:49 +0200
committerGitHub <noreply@github.com>2022-10-06 15:26:49 +0200
commite1daaae42af1a4e465edbdad4bb3c6dd7e7110d5 (patch)
treee69620a913353c681e2a8e079dfa8092c525c894 /test
parentAdd password_hash filter and fix some nits (#78743) (diff)
downloadansible-e1daaae42af1a4e465edbdad4bb3c6dd7e7110d5.tar.xz
ansible-e1daaae42af1a4e465edbdad4bb3c6dd7e7110d5.zip
Fix using FQCN for flush_handlers (#79057)
Fixes #79023
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/targets/handlers/runme.sh4
-rw-r--r--test/integration/targets/handlers/test_fqcn_meta_flush_handlers.yml14
2 files changed, 18 insertions, 0 deletions
diff --git a/test/integration/targets/handlers/runme.sh b/test/integration/targets/handlers/runme.sh
index 1c597c6622..e2d521805f 100755
--- a/test/integration/targets/handlers/runme.sh
+++ b/test/integration/targets/handlers/runme.sh
@@ -166,3 +166,7 @@ ansible-playbook test_flush_handlers_rescue_always.yml -i inventory.handlers "$@
[ "$(grep out.txt -ce 'rescue ran')" = "1" ]
[ "$(grep out.txt -ce 'always ran')" = "2" ]
[ "$(grep out.txt -ce 'should run for both hosts')" = "2" ]
+
+ansible-playbook test_fqcn_meta_flush_handlers.yml -i inventory.handlers "$@" 2>&1 | tee out.txt
+grep out.txt -e "handler ran"
+grep out.txt -e "after flush"
diff --git a/test/integration/targets/handlers/test_fqcn_meta_flush_handlers.yml b/test/integration/targets/handlers/test_fqcn_meta_flush_handlers.yml
new file mode 100644
index 0000000000..f9c67cf56a
--- /dev/null
+++ b/test/integration/targets/handlers/test_fqcn_meta_flush_handlers.yml
@@ -0,0 +1,14 @@
+- hosts: A
+ gather_facts: false
+ tasks:
+ - command: echo
+ notify: handler
+
+ - ansible.builtin.meta: flush_handlers
+
+ - debug:
+ msg: after flush
+ handlers:
+ - name: handler
+ debug:
+ msg: handler ran