diff options
author | James Cammarata <jimi@sngx.net> | 2016-11-13 01:26:43 -0600 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2016-11-13 15:24:44 -0600 |
commit | 4f06a861618953686672213500a3dba58168f65b (patch) | |
tree | 1d2566952efe347bfda77f9e1806d98ef060565c /lib/ansible/executor | |
parent | 527d8307c133100a3ca585589d590c598608ef07 (diff) | |
download | ansible-4f06a861618953686672213500a3dba58168f65b.tar.gz |
Alternately track listening handlers by uuid if no name is set
Fixes #17846
Diffstat (limited to 'lib/ansible/executor')
-rw-r--r-- | lib/ansible/executor/task_queue_manager.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py index d738c19ce3..0732cb29ee 100644 --- a/lib/ansible/executor/task_queue_manager.py +++ b/lib/ansible/executor/task_queue_manager.py @@ -147,7 +147,14 @@ class TaskQueueManager: for listener in listeners: if listener not in self._listening_handlers: self._listening_handlers[listener] = [] - self._listening_handlers[listener].append(handler.get_name()) + + # if the handler has a name, we append it to the list of listening + # handlers, otherwise we use the uuid to avoid trampling on other + # nameless listeners + if handler.name: + self._listening_handlers[listener].append(handler.get_name()) + else: + self._listening_handlers[listener].append(handler._uuid) def load_callbacks(self): ''' |