From dc99a7dac2f7faf94d82cd7d803451b31485cb1f Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Tue, 4 Apr 2017 16:02:52 -0500 Subject: [PATCH] Only insert notified host if it's not already notified for certain cases Fixes #18178 (cherry picked from commit a567c5de65722b920af9ce4f25bc88d9db460746) --- lib/ansible/plugins/strategy/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index 3dbe5505146..924156c9428 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -451,9 +451,10 @@ class StrategyBase: for target_handler_uuid in self._notified_handlers: target_handler = search_handler_blocks_by_uuid(target_handler_uuid, iterator._play.handlers) if target_handler and parent_handler_match(target_handler, handler_name): - self._notified_handlers[target_handler._uuid].append(original_host) - display.vv("NOTIFIED HANDLER %s" % (target_handler.get_name(),)) found = True + if original_host not in self._notified_handlers[target_handler._uuid]: + self._notified_handlers[target_handler._uuid].append(original_host) + display.vv("NOTIFIED HANDLER %s" % (target_handler.get_name(),)) if handler_name in self._listening_handlers: for listening_handler_uuid in self._listening_handlers[handler_name]: