GCE tag prefix for creating ansible group.
This commit is contained in:
parent
271a7f3281
commit
1873e8ed08
1 changed files with 4 additions and 1 deletions
|
@ -257,6 +257,9 @@ class GceInventory(object):
|
||||||
|
|
||||||
tags = node.extra['tags']
|
tags = node.extra['tags']
|
||||||
for t in tags:
|
for t in tags:
|
||||||
|
if t.startswith('group-'):
|
||||||
|
tag = t[6:]
|
||||||
|
else:
|
||||||
tag = 'tag_%s' % t
|
tag = 'tag_%s' % t
|
||||||
if groups.has_key(tag): groups[tag].append(name)
|
if groups.has_key(tag): groups[tag].append(name)
|
||||||
else: groups[tag] = [name]
|
else: groups[tag] = [name]
|
||||||
|
|
Loading…
Reference in a new issue