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

Added template call to _executor_internal to allow the passing of arbitrary data to modules.

This commit is contained in:
Paul Oyston 2014-03-27 17:06:20 +00:00
parent 95a283ccaa
commit 1942a69ed2

View file

@ -543,10 +543,12 @@ class Runner(object):
# fireball, local, etc # fireball, local, etc
port = self.remote_port port = self.remote_port
module_vars = template.template(self.basedir, self.module_vars, host_variables)
inject = {} inject = {}
inject = utils.combine_vars(inject, self.default_vars) inject = utils.combine_vars(inject, self.default_vars)
inject = utils.combine_vars(inject, host_variables) inject = utils.combine_vars(inject, host_variables)
inject = utils.combine_vars(inject, self.module_vars) inject = utils.combine_vars(inject, module_vars)
inject = utils.combine_vars(inject, self.setup_cache[host]) inject = utils.combine_vars(inject, self.setup_cache[host])
inject.setdefault('ansible_ssh_user', self.remote_user) inject.setdefault('ansible_ssh_user', self.remote_user)
inject['hostvars'] = HostVars(self.setup_cache, self.inventory) inject['hostvars'] = HostVars(self.setup_cache, self.inventory)