mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Prevent ec2group from deleting sgs during check_mode runs
This commit is contained in:
committed by
Matt Clay
parent
7e4b1ebff5
commit
585003c546
@@ -289,7 +289,8 @@ def main():
|
||||
if group:
|
||||
'''found a match, delete it'''
|
||||
try:
|
||||
group.delete()
|
||||
if not module.check_mode:
|
||||
group.delete()
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Unable to delete security group '%s' - %s" % (group, e))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user