Commit df77d087 by Victor Schröder

Adds the check for 'not None' also when building host_info dict for ElastiCache…

Adds the check for 'not None' also when building host_info dict for ElastiCache clusters, nodes and replication groups
parent d88a4257
...@@ -1117,6 +1117,10 @@ class Ec2Inventory(object): ...@@ -1117,6 +1117,10 @@ class Ec2Inventory(object):
# Target: Almost everything # Target: Almost everything
elif key == 'ec2_security_groups': elif key == 'ec2_security_groups':
# Skip if SecurityGroups is None
# (it is possible to have the key defined but no value in it).
if value is not None:
sg_ids = [] sg_ids = []
for sg in value: for sg in value:
sg_ids.append(sg['SecurityGroupId']) sg_ids.append(sg['SecurityGroupId'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment