From 0e671baa33e3ecfdf92169f206c7b7c19abc3ea0 Mon Sep 17 00:00:00 2001 From: Victor Salgado Date: Tue, 20 Oct 2015 16:18:01 -0200 Subject: [PATCH 1/2] Fix typo --- lib/ansible/executor/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 28e67f4b6c5..d228437e0fc 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -276,7 +276,7 @@ class TaskExecutor: # the fact that the conditional may specify that the task be skipped due to a # variable not being present which would otherwise cause validation to fail if not self._task.evaluate_conditional(templar, variables): - self._display.debug("when evaulation failed, skipping this task") + self._display.debug("when evaluation failed, skipping this task") return dict(changed=False, skipped=True, skip_reason='Conditional check failed', _ansible_no_log=self._play_context.no_log) # if this task is a TaskInclude, we just return now with a success code so the From c5c5f3bf7ab4b8746fcb725883eda512983dac7b Mon Sep 17 00:00:00 2001 From: Victor Salgado Date: Tue, 20 Oct 2015 16:19:38 -0200 Subject: [PATCH 2/2] Revert back to copying self._task.args --- lib/ansible/executor/task_executor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index d228437e0fc..1da071623dd 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -282,12 +282,13 @@ class TaskExecutor: # if this task is a TaskInclude, we just return now with a success code so the # main thread can expand the task list for the given host if self._task.action == 'include': - include_file = self._task.args.pop('_raw_params', None) + include_variables = self._task.args.copy() + include_file = include_variables.pop('_raw_params', None) if not include_file: return dict(failed=True, msg="No include file was specified to the include") - else: - include_file = templar.template(include_file) - return dict(include=include_file, include_variables=self._task.args) + + include_file = templar.template(include_file) + return dict(include=include_file, include_variables=include_variables) # Now we do final validation on the task, which sets all fields to their final values. # In the case of debug tasks, we save any 'var' params and restore them after validating