From 1febf7cb887a5af1e9dbd79968739f8925f90a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannig=20Perr=C3=A9?= Date: Wed, 28 Oct 2015 22:09:13 +0100 Subject: [PATCH] Fix for issue #12952: this code interfere with debug+var and seems to be unnecessary. --- lib/ansible/executor/task_executor.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index e8a785a02c7..0d5ca69e3e0 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -296,12 +296,6 @@ class TaskExecutor: 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 - # so that variables are not replaced too early. - prev_var = None - if self._task.action == 'debug' and 'var' in self._task.args: - prev_var = self._task.args.pop('var') - self._task.post_validate(templar=templar) if '_variable_params' in self._task.args: variable_params = self._task.args.pop('_variable_params') @@ -310,9 +304,6 @@ class TaskExecutor: variable_params.update(self._task.args) self._task.args = variable_params - if prev_var is not None: - self._task.args['var'] = prev_var - # get the connection and the handler for this execution self._connection = self._get_connection(variables=variables, templar=templar) self._connection.set_host_overrides(host=self._host)