Prevent ec2group from deleting sgs during check_mode runs
This commit is contained in:
parent
7e4b1ebff5
commit
585003c546
1 changed files with 2 additions and 1 deletions
|
@ -289,6 +289,7 @@ def main():
|
||||||
if group:
|
if group:
|
||||||
'''found a match, delete it'''
|
'''found a match, delete it'''
|
||||||
try:
|
try:
|
||||||
|
if not module.check_mode:
|
||||||
group.delete()
|
group.delete()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
module.fail_json(msg="Unable to delete security group '%s' - %s" % (group, e))
|
module.fail_json(msg="Unable to delete security group '%s' - %s" % (group, e))
|
||||||
|
|
Loading…
Reference in a new issue