diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index e7979011cd..337a0377c9 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -341,12 +341,12 @@ class Inventory(object): raise errors.AnsibleError("host not found: %s" % hostname) vars = {} - vars_results = [ plugin.run(host) for plugin in self._vars_plugins ] + vars_results = [ plugin.run(host) for plugin in self._vars_plugins ] for updated in vars_results: if updated is not None: - vars.update(updated) + vars = utils.combine_vars(vars, updated) - vars.update(host.get_variables()) + vars = utils.combine_vars(vars, host.get_variables()) if self.parser is not None: vars = utils.combine_vars(vars, self.parser.get_host_variables(host)) return vars