From d1798d3056eb379421efd842259688b2b04b8189 Mon Sep 17 00:00:00 2001 From: Jose Angel Munoz Date: Mon, 25 May 2020 07:47:01 +0200 Subject: [PATCH] Bug/syslog json exception (#408) * Adds fix setting options * Adds changelog --- changelogs/fragments/407-syslogjson-callback-exception.yml | 2 ++ plugins/callback/syslog_json.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/407-syslogjson-callback-exception.yml diff --git a/changelogs/fragments/407-syslogjson-callback-exception.yml b/changelogs/fragments/407-syslogjson-callback-exception.yml new file mode 100644 index 0000000000..048da5f476 --- /dev/null +++ b/changelogs/fragments/407-syslogjson-callback-exception.yml @@ -0,0 +1,2 @@ +bugfixes: + - syslog_json callback - fix plugin exception when running (https://github.com/ansible-collections/community.general/issues/407). diff --git a/plugins/callback/syslog_json.py b/plugins/callback/syslog_json.py index a53f359471..144a6a1042 100644 --- a/plugins/callback/syslog_json.py +++ b/plugins/callback/syslog_json.py @@ -66,7 +66,9 @@ class CallbackModule(CallbackBase): super(CallbackModule, self).__init__() - self.set_options() + def set_options(self, task_keys=None, var_options=None, direct=None): + + super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct) syslog_host = self.get_option("server") syslog_port = int(self.get_option("port"))