mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Don't use copy.deepcopy in high workload areas, use naive_deepcopy (#44337)
* Don't use copy.deepcopy in high workload areas, use deepishcopy. ci_complete * Add tests * Add changelog fragment * rename to naive_deepcopy and add extra docs * Rename to module_response_deepcopy and move to vars/clean
This commit is contained in:
@@ -629,6 +629,7 @@ class TaskExecutor:
|
||||
if self._task.action in ('set_fact', 'include_vars'):
|
||||
vars_copy.update(result['ansible_facts'])
|
||||
else:
|
||||
# TODO: cleaning of facts should eventually become part of taskresults instead of vars
|
||||
vars_copy.update(namespace_facts(result['ansible_facts']))
|
||||
if C.INJECT_FACTS_AS_VARS:
|
||||
vars_copy.update(clean_facts(result['ansible_facts']))
|
||||
@@ -690,6 +691,7 @@ class TaskExecutor:
|
||||
if self._task.action in ('set_fact', 'include_vars'):
|
||||
variables.update(result['ansible_facts'])
|
||||
else:
|
||||
# TODO: cleaning of facts should eventually become part of taskresults instead of vars
|
||||
variables.update(namespace_facts(result['ansible_facts']))
|
||||
if C.INJECT_FACTS_AS_VARS:
|
||||
variables.update(clean_facts(result['ansible_facts']))
|
||||
|
||||
Reference in New Issue
Block a user