mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
VPC security group membership fix for boto.
* facts now provides a list of existing vpc security group memberships * adding a comma separated list of sg-* tags properly modifies membership
This commit is contained in:
parent
5ce6c86595
commit
8e32f54223
1 changed files with 8 additions and 1 deletions
|
@ -465,7 +465,9 @@ def main():
|
||||||
params["security_groups"] = security_groups.split(',')
|
params["security_groups"] = security_groups.split(',')
|
||||||
|
|
||||||
if vpc_security_groups:
|
if vpc_security_groups:
|
||||||
params["vpc_security_groups"] = vpc_security_groups.split(',')
|
params["vpc_security_groups"] = [
|
||||||
|
boto.rds.VPCSecurityGroupMembership(vpc_group=x) if x else None
|
||||||
|
for x in vpc_security_groups.split(',')]
|
||||||
|
|
||||||
if new_instance_name:
|
if new_instance_name:
|
||||||
params["new_instance_id"] = new_instance_name
|
params["new_instance_id"] = new_instance_name
|
||||||
|
@ -618,9 +620,14 @@ def main():
|
||||||
if resource.status == 'available' and command != 'snapshot':
|
if resource.status == 'available' and command != 'snapshot':
|
||||||
d["endpoint"] = resource.endpoint[0]
|
d["endpoint"] = resource.endpoint[0]
|
||||||
d["port"] = resource.endpoint[1]
|
d["port"] = resource.endpoint[1]
|
||||||
|
if resource.vpc_security_groups is not None:
|
||||||
|
d["vpc_security_groups"] = ','.join(x.vpc_group for x in resource.vpc_security_groups)
|
||||||
|
else:
|
||||||
|
d["vpc_security_groups"] = None
|
||||||
else:
|
else:
|
||||||
d["endpoint"] = None
|
d["endpoint"] = None
|
||||||
d["port"] = None
|
d["port"] = None
|
||||||
|
d["vpc_security_groups"] = None
|
||||||
|
|
||||||
# ReadReplicaSourceDBInstanceIdentifier may or may not exist
|
# ReadReplicaSourceDBInstanceIdentifier may or may not exist
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue