mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
@@ -66,6 +66,8 @@ class InventoryParser(object):
|
|||||||
if line.startswith("["):
|
if line.startswith("["):
|
||||||
active_group_name = line.replace("[","").replace("]","").strip()
|
active_group_name = line.replace("[","").replace("]","").strip()
|
||||||
if line.find(":vars") != -1 or line.find(":children") != -1:
|
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
|
active_group_name = None
|
||||||
else:
|
else:
|
||||||
new_group = self.groups[active_group_name] = Group(name=active_group_name)
|
new_group = self.groups[active_group_name] = Group(name=active_group_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user