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

datadog: Add missing priority (#4311)

* datadog: Add missing priority

* datadog: Add missing priority

* datadog: Add missing priority

* datadog: Add documentation and variable declaration

* datadog: Add documentation and variable declaration

* datadog: Add documentation and variable declaration

* Update plugins/modules/monitoring/datadog/datadog_monitor.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Fredrik Lysén <fredrik.lysen@klarna.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Fredrik Lysén 2022-03-14 07:14:58 +01:00 committed by GitHub
parent 4af7f49ac0
commit c40684db58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,6 +153,11 @@ options:
type: bool type: bool
default: yes default: yes
version_added: 1.3.0 version_added: 1.3.0
priority:
description:
- Integer from 1 (high) to 5 (low) indicating alert severity.
type: int
version_added: 4.6.0
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -239,6 +244,7 @@ def main():
evaluation_delay=dict(), evaluation_delay=dict(),
id=dict(), id=dict(),
include_tags=dict(required=False, default=True, type='bool'), include_tags=dict(required=False, default=True, type='bool'),
priority=dict(type='int'),
) )
) )
@ -298,6 +304,7 @@ def _post_monitor(module, options):
name=_fix_template_vars(module.params['name']), name=_fix_template_vars(module.params['name']),
message=_fix_template_vars(module.params['notification_message']), message=_fix_template_vars(module.params['notification_message']),
escalation_message=_fix_template_vars(module.params['escalation_message']), escalation_message=_fix_template_vars(module.params['escalation_message']),
priority=module.params['priority'],
options=options) options=options)
if module.params['tags'] is not None: if module.params['tags'] is not None:
kwargs['tags'] = module.params['tags'] kwargs['tags'] = module.params['tags']
@ -322,6 +329,7 @@ def _update_monitor(module, monitor, options):
name=_fix_template_vars(module.params['name']), name=_fix_template_vars(module.params['name']),
message=_fix_template_vars(module.params['notification_message']), message=_fix_template_vars(module.params['notification_message']),
escalation_message=_fix_template_vars(module.params['escalation_message']), escalation_message=_fix_template_vars(module.params['escalation_message']),
priority=module.params['priority'],
options=options) options=options)
if module.params['tags'] is not None: if module.params['tags'] is not None:
kwargs['tags'] = module.params['tags'] kwargs['tags'] = module.params['tags']