Commit 3cbf8850 by Michael DeHaan

Change the order the setup cache is used to update things, such that the…

Change the order the setup cache is used to update things, such that the example/playbooks/conditional_part1.yml file
works as advertised
parent 14c2e8de
...@@ -448,9 +448,10 @@ class Runner(object): ...@@ -448,9 +448,10 @@ class Runner(object):
host_variables = self.inventory.get_variables(host) host_variables = self.inventory.get_variables(host)
port = host_variables.get('ansible_ssh_port', self.remote_port) port = host_variables.get('ansible_ssh_port', self.remote_port)
inject = self.setup_cache[host].copy() inject = {}
inject.update(host_variables) inject.update(host_variables)
inject.update(self.module_vars) inject.update(self.module_vars)
inject.update(self.setup_cache[host])
inject['hostvars'] = self.setup_cache inject['hostvars'] = self.setup_cache
# allow with_items to work in playbooks... # allow with_items to work in playbooks...
......
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