|
|
@ -282,12 +282,13 @@ class TaskExecutor:
|
|
|
|
# if this task is a TaskInclude, we just return now with a success code so the
|
|
|
|
# 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
|
|
|
|
# main thread can expand the task list for the given host
|
|
|
|
if self._task.action == 'include':
|
|
|
|
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:
|
|
|
|
if not include_file:
|
|
|
|
return dict(failed=True, msg="No include file was specified to the include")
|
|
|
|
return dict(failed=True, msg="No include file was specified to the include")
|
|
|
|
else:
|
|
|
|
|
|
|
|
include_file = templar.template(include_file)
|
|
|
|
include_file = templar.template(include_file)
|
|
|
|
return dict(include=include_file, include_variables=self._task.args)
|
|
|
|
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
|
|
|
|
# In the case of debug tasks, we save any 'var' params and restore them after validating
|
|
|
|