diff --git a/changelogs/fragments/409-datadog-monitor-include-tags.yaml b/changelogs/fragments/409-datadog-monitor-include-tags.yaml new file mode 100644 index 0000000000..1c1ece6454 --- /dev/null +++ b/changelogs/fragments/409-datadog-monitor-include-tags.yaml @@ -0,0 +1,2 @@ +minor_changes: + - datadog_monitor - add ``include_tags`` option (https://github.com/ansible/ansible/issues/57441). diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index 008b305f88..cccc0343d1 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -135,6 +135,12 @@ options: - The ID of the alert. - If set, will be used instead of the name to locate the alert. type: str + include_tags: + description: + - Whether notifications from this monitor automatically inserts its triggering tags into the title. + type: bool + default: yes + version_added: 1.3.0 ''' EXAMPLES = ''' @@ -219,7 +225,8 @@ def main(): require_full_window=dict(required=False, default=None, type='bool'), new_host_delay=dict(required=False, default=None), evaluation_delay=dict(required=False, default=None), - id=dict(required=False) + id=dict(required=False), + include_tags=dict(required=False, default=True, type='bool'), ) ) @@ -333,7 +340,8 @@ def install_monitor(module): "locked": module.boolean(module.params['locked']), "require_full_window": module.params['require_full_window'], "new_host_delay": module.params['new_host_delay'], - "evaluation_delay": module.params['evaluation_delay'] + "evaluation_delay": module.params['evaluation_delay'], + "include_tags": module.params['include_tags'], } if module.params['type'] == "service check":