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

pull/6725/head
Paul Oyston 11 years ago
parent 95a283ccaa
commit 1942a69ed2

@ -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)

Loading…
Cancel
Save