Merge pull request #11631 from bearstech/gce
GCE tag prefix for creating ansible group.
This commit is contained in:
commit
5b5ba35111
1 changed files with 4 additions and 1 deletions
|
@ -257,6 +257,9 @@ class GceInventory(object):
|
|||
|
||||
tags = node.extra['tags']
|
||||
for t in tags:
|
||||
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]
|
||||
|
|
Loading…
Reference in a new issue