mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
4679d8d6e5
commit
5504f13c68
1 changed files with 2 additions and 0 deletions
|
@ -66,6 +66,8 @@ class InventoryParser(object):
|
|||
if line.startswith("["):
|
||||
active_group_name = line.replace("[","").replace("]","").strip()
|
||||
if line.find(":vars") != -1 or line.find(":children") != -1:
|
||||
active_group_name = active_group_name.rsplit(":", 1)[0]
|
||||
self.groups[active_group_name] = Group(name=active_group_name)
|
||||
active_group_name = None
|
||||
else:
|
||||
new_group = self.groups[active_group_name] = Group(name=active_group_name)
|
||||
|
|
Loading…
Reference in a new issue