Adjust conditional for disabling alert email (#63951)
* Adjust conditional for disabling alert email Conditional was improperly disabling existing alert email when it was found enabled. The expectation is that it should only disable if module.param['enabled'] was set to false. * Adjusted disable logic Added back in the logic of only disabling the alert email if it is module.params['enabled'] is false AND current value of enabled is true on the array
This commit is contained in:
parent
5c0b2c151c
commit
fbdd295cef
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ def main():
|
|||
create_alert(module, array)
|
||||
elif module.params['state'] == 'present' and exists and not enabled and module.params['enabled']:
|
||||
enable_alert(module, array)
|
||||
elif module.params['state'] == 'present' and exists and enabled:
|
||||
elif module.params['state'] == 'present' and exists and enabled and not module.params['enabled']:
|
||||
disable_alert(module, array)
|
||||
elif module.params['state'] == 'absent' and exists:
|
||||
delete_alert(module, array)
|
||||
|
|
Loading…
Reference in a new issue