1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

inventory directory parser: add hosts to group non-recursively

This commit is contained in:
Serge van Ginderachter 2014-03-05 16:23:34 +01:00
parent 605156c904
commit 262ba0460a

View file

@ -71,7 +71,7 @@ class InventoryDirectory(object):
# note: depth numbers on duplicates may be bogus
for k, v in group.get_variables().iteritems():
self.groups[name].set_variable(k, v)
for host in group.get_hosts():
for host in group.hosts:
if host.name not in self.hosts:
self.hosts[host.name] = host
else: