summaryrefslogtreecommitdiff
path: root/lib/ansible/executor/task_queue_manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/executor/task_queue_manager.py')
-rw-r--r--lib/ansible/executor/task_queue_manager.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py
index ae41afb600..d4f4c4d275 100644
--- a/lib/ansible/executor/task_queue_manager.py
+++ b/lib/ansible/executor/task_queue_manager.py
@@ -150,12 +150,13 @@ class TaskQueueManager:
# the name of the current plugin and type to see if we need to skip
# loading this callback plugin
callback_type = getattr(callback_plugin, 'CALLBACK_TYPE', None)
+ callback_needs_whitelist = getattr(callback_plugin, 'CALLBACK_NEEDS_WHITELIST', False)
(callback_name, _) = os.path.splitext(os.path.basename(callback_plugin._original_path))
if callback_type == 'stdout':
if callback_name != self._stdout_callback or stdout_callback_loaded:
continue
stdout_callback_loaded = True
- elif C.DEFAULT_CALLBACK_WHITELIST is None or callback_name not in C.DEFAULT_CALLBACK_WHITELIST:
+ elif callback_needs_whitelist and (C.DEFAULT_CALLBACK_WHITELIST is None or callback_name not in C.DEFAULT_CALLBACK_WHITELIST):
continue
self._callback_plugins.append(callback_plugin(self._display))