From a567c5de65722b920af9ce4f25bc88d9db460746 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 --- 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 eeb429b9b06..ce575fe6675 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -454,9 +454,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]: