inventory directory parser: add groups to parent_groups non-recursively

parent 262ba046
...@@ -83,8 +83,8 @@ class InventoryDirectory(object): ...@@ -83,8 +83,8 @@ class InventoryDirectory(object):
# This needs to be a second loop to ensure all the parent groups exist # This needs to be a second loop to ensure all the parent groups exist
for name, group in parser.groups.iteritems(): for name, group in parser.groups.iteritems():
for ancestor in group.get_ancestors(): for parent in group.parent_groups:
self.groups[ancestor.name].add_child_group(self.groups[name]) self.groups[parent.name].add_child_group(self.groups[name])
def get_host_variables(self, host): def get_host_variables(self, host):
""" Gets additional host variables from all inventories """ """ Gets additional host variables from all inventories """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment