GCE tag prefix for creating ansible group.

This commit is contained in:
Mathieu Lecarme 2015-07-17 22:28:30 +02:00
parent 271a7f3281
commit 1873e8ed08

View file

@ -257,7 +257,10 @@ class GceInventory(object):
tags = node.extra['tags']
for t in tags:
tag = 'tag_%s' % t
if t.startswith('group-'):
tag = t[6:]
else:
tag = 'tag_%s' % t
if groups.has_key(tag): groups[tag].append(name)
else: groups[tag] = [name]