mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #47525 from baniobloom/duplicate_sec_group_rule
Trying to add a duplicate sec group rule true
This commit is contained in:
commit
9c5dde1449
1 changed files with 3 additions and 0 deletions
|
@ -476,6 +476,9 @@ def authorize(name=None, source_group_name=None,
|
|||
log.error(msg)
|
||||
return False
|
||||
except boto.exception.EC2ResponseError as e:
|
||||
# if we are trying to add the same rule then we are already in the desired state, return true
|
||||
if e.error_code == 'InvalidPermission.Duplicate':
|
||||
return True
|
||||
msg = ('Failed to add rule to security group {0} with id {1}.'
|
||||
.format(group.name, group.id))
|
||||
log.error(msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue