From 0954fadff7c55a04a1d88e853c50f9aac64258fe Mon Sep 17 00:00:00 2001 From: Karol Chrapek Date: Tue, 22 Aug 2017 15:38:07 +0200 Subject: [PATCH] Correct mute function in datadog_monitor (#19662) --- lib/ansible/modules/monitoring/datadog_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/monitoring/datadog_monitor.py b/lib/ansible/modules/monitoring/datadog_monitor.py index 21ec87ff45d..2d7d03f1ac5 100644 --- a/lib/ansible/modules/monitoring/datadog_monitor.py +++ b/lib/ansible/modules/monitoring/datadog_monitor.py @@ -329,7 +329,7 @@ def mute_monitor(module): module.fail_json(msg="Monitor %s not found!" % module.params['name']) elif monitor['options']['silenced']: module.fail_json(msg="Monitor is already muted. Datadog does not allow to modify muted alerts, consider unmuting it first.") - elif (module.params['silenced'] is not None and len(set(monitor['options']['silenced']) - set(module.params['silenced'])) == 0): + elif (module.params['silenced'] is not None and len(set(monitor['options']['silenced']) ^ set(module.params['silenced'])) == 0): module.exit_json(changed=False) try: if module.params['silenced'] is None or module.params['silenced'] == "":