correctly get all hosts in 'all'
This commit is contained in:
parent
283a88444f
commit
0d5d5f2bf6
1 changed files with 3 additions and 1 deletions
|
@ -161,6 +161,7 @@ class Inventory(object):
|
|||
|
||||
### POST PROCESS groups and hosts after specific parser was invoked
|
||||
|
||||
hosts = []
|
||||
group_names = set()
|
||||
# set group vars from group_vars/ files and vars plugins
|
||||
for g in self.groups:
|
||||
|
@ -168,10 +169,11 @@ class Inventory(object):
|
|||
group.vars = combine_vars(group.vars, self.get_group_variables(group.name))
|
||||
self.get_group_vars(group)
|
||||
group_names.add(group.name)
|
||||
hosts.extend(group.get_hosts())
|
||||
|
||||
host_names = set()
|
||||
# get host vars from host_vars/ files and vars plugins
|
||||
for host in self.get_hosts(ignore_limits=True, ignore_restrictions=True):
|
||||
for host in hosts:
|
||||
host.vars = combine_vars(host.vars, self.get_host_variables(host.name))
|
||||
self.get_host_vars(host)
|
||||
host_names.add(host.name)
|
||||
|
|
Loading…
Reference in a new issue