From 694546d784d8c9b18f825cdfc827eb68b0359861 Mon Sep 17 00:00:00 2001 From: Charles C Date: Thu, 28 May 2020 15:04:19 -0700 Subject: [PATCH] datadog_monitor: kwargs for _update_monitor used message vs notification_message (#389) * kwargs for _update_monitor wasn't corrected to new notification_message param * forgot to bump a changelog fragment * Update changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- .../389-datadog_monitor-corrects-deprecated-message-param.yml | 2 ++ plugins/modules/monitoring/datadog/datadog_monitor.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml diff --git a/changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml b/changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml new file mode 100644 index 0000000000..db8c6e2448 --- /dev/null +++ b/changelogs/fragments/389-datadog_monitor-corrects-deprecated-message-param.yml @@ -0,0 +1,2 @@ +bugfixes: + - datadog_monitor - Corrects ``_update_monitor`` to use ``notification_message`` insteade of deprecated ``message`` (https://github.com/ansible-collections/community.general/pull/389). diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index e14081b307..64a69987d0 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -301,7 +301,7 @@ def _update_monitor(module, monitor, options): try: kwargs = dict(id=monitor['id'], query=module.params['query'], name=_fix_template_vars(module.params['name']), - message=_fix_template_vars(module.params['message']), + message=_fix_template_vars(module.params['notification_message']), escalation_message=_fix_template_vars(module.params['escalation_message']), options=options) if module.params['tags'] is not None: