From f25ad9dc51db9d906174dd7c0e7c1a8905845952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Schr=C3=B6der?= Date: Sun, 14 Jun 2015 23:21:33 +0200 Subject: [PATCH] Adds the appropriate key checks for ElastiCache replication groups in get_dict_from_describe_dict method --- plugins/inventory/ec2.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index 078e07b97b..9aec945472 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -1088,6 +1088,11 @@ class Ec2Inventory(object): if key == 'ec2_endpoint' and value: host_info['ec2_endpoint_address'] = value['Address'] host_info['ec2_endpoint_port'] = value['Port'] + if key == 'ec2_node_groups' and value: + host_info['ec2_endpoint_address'] = value[0]['PrimaryEndpoint']['Address'] + host_info['ec2_endpoint_port'] = value[0]['PrimaryEndpoint']['Port'] + if key == 'ec2_member_clusters' and value: + host_info['ec2_member_clusters'] = ','.join([str(i) for i in value]) elif key == 'ec2_cache_parameter_group': host_info['ec2_cache_parameter_group_name'] = value['CacheParameterGroupName'] host_info['ec2_cache_parameter_apply_status'] = value['ParameterApplyStatus']