mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 15:41:22 -07:00
parent
7b5d2d3bec
commit
a0dea1ac35
1 changed files with 4 additions and 4 deletions
|
@ -239,15 +239,15 @@ class VariableManager:
|
||||||
# files and then any vars from host_vars files which may apply to
|
# files and then any vars from host_vars files which may apply to
|
||||||
# this host or the groups it belongs to
|
# this host or the groups it belongs to
|
||||||
|
|
||||||
# we merge in vars from groups specified in the inventory (INI or script)
|
# we merge in the special 'all' group_vars first, if they exist
|
||||||
all_vars = combine_vars(all_vars, host.get_group_vars())
|
|
||||||
|
|
||||||
# then we merge in the special 'all' group_vars first, if they exist
|
|
||||||
if 'all' in self._group_vars_files:
|
if 'all' in self._group_vars_files:
|
||||||
data = preprocess_vars(self._group_vars_files['all'])
|
data = preprocess_vars(self._group_vars_files['all'])
|
||||||
for item in data:
|
for item in data:
|
||||||
all_vars = combine_vars(all_vars, item)
|
all_vars = combine_vars(all_vars, item)
|
||||||
|
|
||||||
|
# we merge in vars from groups specified in the inventory (INI or script)
|
||||||
|
all_vars = combine_vars(all_vars, host.get_group_vars())
|
||||||
|
|
||||||
for group in sorted(host.get_groups(), key=lambda g: g.depth):
|
for group in sorted(host.get_groups(), key=lambda g: g.depth):
|
||||||
if group.name in self._group_vars_files and group.name != 'all':
|
if group.name in self._group_vars_files and group.name != 'all':
|
||||||
for data in self._group_vars_files[group.name]:
|
for data in self._group_vars_files[group.name]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue