Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand $item for copy and fetch #457

Merged
merged 1 commit into from
Jun 8, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/ansible/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ def _execute_copy(self, conn, tmp):
results=dict(failed=True, msg="could not find src in first_available_file list")
return ReturnData(host=conn.host, is_error=True, results=results)

if self.module_vars is not None:
inject.update(self.module_vars)

source = utils.template(source, inject, self.setup_cache)

# transfer the file to a remote tmp location
Expand Down Expand Up @@ -464,6 +467,8 @@ def _execute_fetch(self, conn, tmp):

# apply templating to source argument
inject = self.setup_cache.get(conn.host,{})
if self.module_vars is not None:
inject.update(self.module_vars)
source = utils.template(source, inject, self.setup_cache)

# apply templating to dest argument
Expand Down