|
|
@ -329,7 +329,7 @@ def mute_monitor(module):
|
|
|
|
module.fail_json(msg="Monitor %s not found!" % module.params['name'])
|
|
|
|
module.fail_json(msg="Monitor %s not found!" % module.params['name'])
|
|
|
|
elif monitor['options']['silenced']:
|
|
|
|
elif monitor['options']['silenced']:
|
|
|
|
module.fail_json(msg="Monitor is already muted. Datadog does not allow to modify muted alerts, consider unmuting it first.")
|
|
|
|
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)
|
|
|
|
module.exit_json(changed=False)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if module.params['silenced'] is None or module.params['silenced'] == "":
|
|
|
|
if module.params['silenced'] is None or module.params['silenced'] == "":
|
|
|
|