Skip to content

Commit

Permalink
[PR #5761/84ebda65 backport][stable-4] Fix callback plugin types (#5762)
Browse files Browse the repository at this point in the history
Fix callback plugin types (#5761)

Fix callback types.

(cherry picked from commit 84ebda6)

Co-authored-by: Felix Fontein <felix@fontein.de>
  • Loading branch information
patchback[bot] and felixfontein authored Jan 4, 2023
1 parent 4ea084c commit 9b13efe
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions changelogs/fragments/5761-callback-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bugfixes:
- "loganalytics callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)."
- "logdna callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)."
- "logstash callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)."
- "splunk callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)."
- "sumologic callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)."
- "syslog_json callback plugin - adjust type of callback to ``notification``, it was incorrectly classified as ``aggregate`` before (https://github.com/ansible-collections/community.general/pull/5761)."
4 changes: 2 additions & 2 deletions plugins/callback/loganalytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DOCUMENTATION = '''
name: loganalytics
type: aggregate
type: notification
short_description: Posts task results to Azure Log Analytics
author: "Cyrus Li (@zhcli) <cyrus1006@gmail.com>"
description:
Expand Down Expand Up @@ -153,7 +153,7 @@ def send_event(self, workspace_id, shared_key, state, result, runtime):

class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'loganalytics'
CALLBACK_NEEDS_WHITELIST = True

Expand Down
4 changes: 2 additions & 2 deletions plugins/callback/logdna.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
DOCUMENTATION = '''
author: Unknown (!UNKNOWN)
name: logdna
type: aggregate
type: notification
short_description: Sends playbook logs to LogDNA
description:
- This callback will report logs from playbook actions, tasks, and events to LogDNA (https://app.logdna.com)
Expand Down Expand Up @@ -110,7 +110,7 @@ def isJSONable(obj):
class CallbackModule(CallbackBase):

CALLBACK_VERSION = 0.1
CALLBACK_TYPE = 'aggregate'
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'community.general.logdna'
CALLBACK_NEEDS_WHITELIST = True

Expand Down
2 changes: 1 addition & 1 deletion plugins/callback/logstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
class CallbackModule(CallbackBase):

CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'community.general.logstash'
CALLBACK_NEEDS_WHITELIST = True

Expand Down
4 changes: 2 additions & 2 deletions plugins/callback/splunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

DOCUMENTATION = '''
name: splunk
type: aggregate
type: notification
short_description: Sends task result events to Splunk HTTP Event Collector
author: "Stuart Hirst (!UNKNOWN) <support@convergingdata.com>"
description:
Expand Down Expand Up @@ -176,7 +176,7 @@ def send_event(self, url, authtoken, validate_certs, include_milliseconds, batch

class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'community.general.splunk'
CALLBACK_NEEDS_WHITELIST = True

Expand Down
4 changes: 2 additions & 2 deletions plugins/callback/sumologic.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

DOCUMENTATION = '''
name: sumologic
type: aggregate
type: notification
short_description: Sends task result events to Sumologic
author: "Ryan Currah (@ryancurrah)"
description:
Expand Down Expand Up @@ -122,7 +122,7 @@ def send_event(self, url, state, result, runtime):

class CallbackModule(CallbackBase):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'community.general.sumologic'
CALLBACK_NEEDS_WHITELIST = True

Expand Down
2 changes: 1 addition & 1 deletion plugins/callback/syslog_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CallbackModule(CallbackBase):
"""

CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_TYPE = 'notification'
CALLBACK_NAME = 'community.general.syslog_json'
CALLBACK_NEEDS_WHITELIST = True

Expand Down

0 comments on commit 9b13efe

Please sign in to comment.