diff --git a/lib/ansible/modules/storage/purestorage/purefa_alert.py b/lib/ansible/modules/storage/purestorage/purefa_alert.py index 7d482ea1072..23c683a4b62 100644 --- a/lib/ansible/modules/storage/purestorage/purefa_alert.py +++ b/lib/ansible/modules/storage/purestorage/purefa_alert.py @@ -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)