|
|
|
@ -416,14 +416,10 @@ class TaskExecutor:
|
|
|
|
|
include_file = templar.template(include_file)
|
|
|
|
|
return dict(include=include_file, include_variables=include_variables)
|
|
|
|
|
|
|
|
|
|
# TODO: not needed?
|
|
|
|
|
# if this task is a IncludeRole, we just return now with a success code so the main thread can expand the task list for the given host
|
|
|
|
|
elif self._task.action == 'include_role':
|
|
|
|
|
include_variables = self._task.args.copy()
|
|
|
|
|
role = templar.template(self._task._role_name)
|
|
|
|
|
if not role:
|
|
|
|
|
return dict(failed=True, msg="No role was specified to include")
|
|
|
|
|
return dict(include_role=role, include_variables=include_variables)
|
|
|
|
|
return dict(include_role=self._task, include_variables=include_variables)
|
|
|
|
|
|
|
|
|
|
# Now we do final validation on the task, which sets all fields to their final values.
|
|
|
|
|
self._task.post_validate(templar=templar)
|
|
|
|
|