summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJames Tanner <tanner.jc@gmail.com>2013-11-11 14:07:57 -0500
committerJames Tanner <tanner.jc@gmail.com>2013-11-11 14:09:34 -0500
commit5eaaca68d10434cd7e13df5320ebcdfc31b9dde1 (patch)
tree356efa5e96868c84cd764e4d284067317e5a34b4 /plugins
parent0c29807ba3bc78df676bd6cfa517e0631d01cbf4 (diff)
parent36fe595de82407149b951756c06ea95956919ea5 (diff)
downloadansible-5eaaca68d10434cd7e13df5320ebcdfc31b9dde1.tar.gz
Merge pull request #4005 from herbyg-axial/ansible/
ec2 inventory script: Add a global group for EC2 and RDS instances when listing EC2 inventory
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/inventory/ec2.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py
index 27d724ea53..47f9ddb385 100755
--- a/plugins/inventory/ec2.py
+++ b/plugins/inventory/ec2.py
@@ -373,6 +373,9 @@ class Ec2Inventory(object):
for name in route53_names:
self.push(self.inventory, name, dest)
+ # Global Tag: tag all EC2 instances
+ self.push(self.inventory, 'ec2', dest)
+
def add_rds_instance(self, instance, region):
''' Adds an RDS instance to the inventory and index, as long as it is
@@ -424,6 +427,9 @@ class Ec2Inventory(object):
# Inventory: Group by parameter group
self.push(self.inventory, self.to_safe("rds_parameter_group_" + instance.parameter_group.name), dest)
+ # Global Tag: all RDS instances
+ self.push(self.inventory, 'rds', dest)
+
def get_route53_records(self):
''' Get and store the map of resource records to domain names that