Address memory ballooning caused by task caching changes (#35921)

* Exclude parent when copying included task to avoid memory issues. Fixes #35796

* Simplify implicit block squashing to pre-group, instead of post re-parenting
This commit is contained in:
Matt Martz 2018-02-08 17:28:07 -06:00 committed by Matt Davis
parent b6dc27249a
commit 7d1eb88ecf
2 changed files with 31 additions and 21 deletions

View file

@ -763,7 +763,8 @@ class StrategyBase:
elif not isinstance(data, list):
raise AnsibleError("included task files must contain a list of tasks")
ti_copy = included_file._task.copy()
ti_copy = included_file._task.copy(exclude_parent=True)
ti_copy._parent = included_file._task._parent
temp_vars = ti_copy.vars.copy()
temp_vars.update(included_file._args)
# pop tags out of the include args, if they were specified there, and assign