1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix localized set options in callbacks

signature changed but callbacks overriding it were not updated

fixes #33006
This commit is contained in:
Brian Coca 2017-11-17 12:27:32 -05:00 committed by Brian Coca
parent 84117e57ba
commit 53cbc9f6ee
4 changed files with 8 additions and 9 deletions

View file

@ -111,7 +111,6 @@ try:
except ImportError:
HAS_FLATDICT = False
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_bytes, to_text, to_native
from ansible.plugins.callback import CallbackBase
@ -249,9 +248,9 @@ class CallbackModule(CallbackBase):
# self.set_options({'api': 'data.logentries.com', 'port': 80,
# 'tls_port': 10000, 'use_tls': True, 'flatten': False, 'token': 'ae693734-4c5b-4a44-8814-1d2feb5c8241'})
def set_options(self, options):
def set_options(self, task_keys=None, var_options=None, direct=None):
super(CallbackModule, self).set_options(options)
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
# get options
try:

View file

@ -119,9 +119,9 @@ class CallbackModule(CallbackBase):
super(CallbackModule, self).__init__()
def set_options(self, options):
def set_options(self, task_keys=None, var_options=None, direct=None):
super(CallbackModule, self).set_options(options)
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
self.sort_order = self._plugin_options['sort_order']
if self.sort_order is not None:

View file

@ -88,9 +88,9 @@ class CallbackModule(CallbackBase):
self.last_task_name = None
self.printed_last_task = False
def set_options(self, options):
def set_options(self, task_keys=None, var_options=None, direct=None):
super(CallbackModule, self).set_options(options)
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
global DONT_COLORIZE
DONT_COLORIZE = self._plugin_options['nocolor']

View file

@ -89,9 +89,9 @@ class CallbackModule(CallbackBase):
# than 1 simultaneous playbooks running
self.guid = uuid.uuid4().hex[:6]
def set_options(self, options):
def set_options(self, task_keys=None, var_options=None, direct=None):
super(CallbackModule, self).set_options(options)
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
self.webhook_url = self._plugin_options['webhook_url']
self.channel = self._plugin_options['channel']