mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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,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]
|
||||
|
||||
|
|
Loading…
Reference in a new issue