Skip to content

Commit

Permalink
Revert "make callbacks declare needing whitelisting"
Browse files Browse the repository at this point in the history
another premature merge
This reverts commit df8ff85.
  • Loading branch information
bcoca committed Oct 22, 2015
1 parent 3c1c5b0 commit 5017a96
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 13 deletions.
3 changes: 1 addition & 2 deletions lib/ansible/executor/task_queue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,12 @@ def load_callbacks(self):
# 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 callback_needs_whitelist and (C.DEFAULT_CALLBACK_WHITELIST is None or callback_name not in C.DEFAULT_CALLBACK_WHITELIST):
elif C.DEFAULT_CALLBACK_WHITELIST is None or callback_name not in C.DEFAULT_CALLBACK_WHITELIST:
continue

self._callback_plugins.append(callback_plugin(self._display))
Expand Down
3 changes: 1 addition & 2 deletions lib/ansible/plugins/callback/context_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class CallbackModule(CallbackBase):
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'context_demo'
CALLBACK_NEEDS_WHITELIST = True
CALLBACK_TYPE = 'context_demo'

def v2_on_any(self, *args, **kwargs):
i = 0
Expand Down
3 changes: 1 addition & 2 deletions lib/ansible/plugins/callback/hipchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ class CallbackModule(CallbackBase):
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_VERSION = 2.0
CALLBACK_NAME = 'hipchat'
CALLBACK_NEEDS_WHITELIST = True

def __init__(self, display):

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/log_plays.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'log_plays'
CALLBACK_NEEDS_WHITELIST = True

TIME_FORMAT="%b %d %Y %H:%M:%S"
MSG_FORMAT="%(now)s - %(category)s - %(data)s\n\n"
Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'mail'
CALLBACK_NEEDS_WHITELIST = True

def v2_runner_on_failed(self, res, ignore_errors=False):

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/osx_say.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'osx_say'
CALLBACK_NEEDS_WHITELIST = True

def __init__(self, display):

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/profile_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'profile_tasks'
CALLBACK_NEEDS_WHITELIST = True

def __init__(self, display):
self.stats = {}
Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/syslog_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'syslog_json'
CALLBACK_NEEDS_WHITELIST = True

def __init__(self, display):

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'timer'
CALLBACK_NEEDS_WHITELIST = True

def __init__(self, display):

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/plugins/callback/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'tree'
CALLBACK_NEEDS_WHITELIST = True

def __init__(self, display):
super(CallbackModule, self).__init__(display)
Expand Down

0 comments on commit 5017a96

Please sign in to comment.