Commit b83bce4b by Serge van Ginderachter Committed by James Cammarata

Merge variables for hosts instead of updating in get_variables()

parent adf06c0b
......@@ -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'])
......
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