avoid errors when dynamic role
(cherry picked from commit 6f2936e57b268e9f8a2ed5c23c6af49888f869ae)
This commit is contained in:
parent
141ed26e02
commit
d4b8178b4b
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue