1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Change the order the setup cache is used to update things, such that the example/playbooks/conditional_part1.yml file

works as advertised
This commit is contained in:
Michael DeHaan 2012-08-18 19:49:49 -04:00
parent 14c2e8de0c
commit 3cbf885079

View file

@ -448,9 +448,10 @@ class Runner(object):
host_variables = self.inventory.get_variables(host)
port = host_variables.get('ansible_ssh_port', self.remote_port)
inject = self.setup_cache[host].copy()
inject = {}
inject.update(host_variables)
inject.update(self.module_vars)
inject.update(self.setup_cache[host])
inject['hostvars'] = self.setup_cache
# allow with_items to work in playbooks...