mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -07:00
fixes for stripping (#52930)
function changed to do in place replacement, should be less expensive even with copy as it avoids 'sub copies', can compose with module_args_copy to create replacement for old behavior attempt to fix #52910 * handle lists and subdicts correctly * added missing exception case, which was not noticed since 'cleaning' was not working * added comments to clarify exceptions
This commit is contained in:
parent
7a387e216e
commit
b793f08a92
11 changed files with 83 additions and 47 deletions
|
@ -49,7 +49,7 @@ from ansible.plugins.loader import action_loader, connection_loader, filter_load
|
|||
from ansible.template import Templar
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.vars import combine_vars
|
||||
from ansible.vars.clean import strip_internal_keys
|
||||
from ansible.vars.clean import strip_internal_keys, module_response_deepcopy
|
||||
|
||||
display = Display()
|
||||
|
||||
|
@ -436,7 +436,7 @@ class StrategyBase:
|
|||
if original_task.register:
|
||||
host_list = self.get_task_hosts(iterator, original_host, original_task)
|
||||
|
||||
clean_copy = strip_internal_keys(task_result._result)
|
||||
clean_copy = strip_internal_keys(module_response_deepcopy(task_result._result))
|
||||
if 'invocation' in clean_copy:
|
||||
del clean_copy['invocation']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue