From 48d4da3a9470c6be1e60aa7c255a4222d6e912e4 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Thu, 15 Jan 2015 16:19:50 -0500 Subject: [PATCH] add tagless grouping for destinations without any tags --- plugins/inventory/ec2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index 769ca433b0c..f1b3524e120 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -465,6 +465,10 @@ class Ec2Inventory(object): if self.nested_groups: self.push_group(self.inventory, 'route53', name) + # Global Tag: instances without tags + if len(instance.tags) == 0: + self.push(self.inventory, 'tag_none', dest) + # Global Tag: tag all EC2 instances self.push(self.inventory, 'ec2', dest)