1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge branch 'devel_fix_debug_var' of https://github.com/Yannig/ansible into Yannig-devel_fix_debug_var

This commit is contained in:
James Cammarata 2015-10-30 08:37:03 -04:00
commit a5bd92ca4b

View file

@ -307,12 +307,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')
@ -321,9 +315,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)