|
|
@ -296,12 +296,6 @@ class TaskExecutor:
|
|
|
|
return dict(include=include_file, include_variables=include_variables)
|
|
|
|
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.
|
|
|
|
# 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)
|
|
|
|
self._task.post_validate(templar=templar)
|
|
|
|
if '_variable_params' in self._task.args:
|
|
|
|
if '_variable_params' in self._task.args:
|
|
|
|
variable_params = self._task.args.pop('_variable_params')
|
|
|
|
variable_params = self._task.args.pop('_variable_params')
|
|
|
@ -310,9 +304,6 @@ class TaskExecutor:
|
|
|
|
variable_params.update(self._task.args)
|
|
|
|
variable_params.update(self._task.args)
|
|
|
|
self._task.args = variable_params
|
|
|
|
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
|
|
|
|
# get the connection and the handler for this execution
|
|
|
|
self._connection = self._get_connection(variables=variables, templar=templar)
|
|
|
|
self._connection = self._get_connection(variables=variables, templar=templar)
|
|
|
|
self._connection.set_host_overrides(host=self._host)
|
|
|
|
self._connection.set_host_overrides(host=self._host)
|
|
|
|