mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[cloud] Add DBName to RDS Facts if it exists (#27121)
* + Add DBName in RDS Facts if it's not null * - remove 2 offending lines for automatic tests * Syntax change for shorter code and improved readability
This commit is contained in:
parent
5be37018a2
commit
54c295699e
1 changed files with 4 additions and 2 deletions
|
@ -780,7 +780,8 @@ class RDSDBInstance:
|
|||
d["endpoint"] = None
|
||||
d["port"] = None
|
||||
d["vpc_security_groups"] = None
|
||||
|
||||
if self.instance.DBName:
|
||||
d['DBName'] = self.instance.DBName
|
||||
# ReadReplicaSourceDBInstanceIdentifier may or may not exist
|
||||
try:
|
||||
d["replication_source"] = self.instance.ReadReplicaSourceDBInstanceIdentifier
|
||||
|
@ -873,7 +874,8 @@ class RDS2DBInstance:
|
|||
else:
|
||||
d['endpoint'] = None
|
||||
d['port'] = None
|
||||
|
||||
if self.instance["DBName"]:
|
||||
d['DBName'] = self.instance['DBName']
|
||||
return d
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue