mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge variables for hosts instead of updating in get_variables()
This commit is contained in:
parent
6975e5fd73
commit
a1f09bd89f
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Host(object):
|
|||
groups = self.get_groups()
|
||||
for group in sorted(groups, key=lambda g: g.depth):
|
||||
results = utils.combine_vars(results, group.get_variables())
|
||||
results.update(self.vars)
|
||||
results = utils.combine_vars(results, self.vars)
|
||||
results['inventory_hostname'] = self.name
|
||||
results['inventory_hostname_short'] = self.name.split('.')[0]
|
||||
results['group_names'] = sorted([ g.name for g in groups if g.name != 'all'])
|
||||
|
|
Loading…
Reference in a new issue