diff options
author | James Cammarata <jimi@sngx.net> | 2018-01-04 08:23:35 -0600 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-01-19 08:06:07 -0800 |
commit | 4f0c962b4d3835d370289a74383b022295cc0cde (patch) | |
tree | 8dcbeead1d84f4c798c756adc5629fece780e606 | |
parent | c570a2fff9d5029894486c9a58805e5f84768aaf (diff) | |
download | ansible-4f0c962b4d3835d370289a74383b022295cc0cde.tar.gz |
Don't use the Task object in the dictionary of results for include_role
The short-circuiting of include_role in TaskExecutor was using the _task object
in the result dictionary. This causes the playbook class to be serialized, which
is something we no longer do due to speed/size problems with nested objects.
Simply removing this should fix a lot of memory and speed problems with include_role.
(cherry picked from commit c30ee42fe1f0a9666a90f4d63121780f2a186c54)
-rw-r--r-- | lib/ansible/executor/task_executor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index cc0f001db7..f7795af059 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -466,7 +466,7 @@ class TaskExecutor: # 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() - return dict(include_role=self._task, include_variables=include_variables) + return dict(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) |