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

Merge pull request #12842 from mcsalgado/include_with_items

Revert back to copying self._task.args
This commit is contained in:
James Cammarata 2015-10-20 15:33:34 -04:00
commit 3ddda2f460

View file

@ -276,18 +276,19 @@ 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
# 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