mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Don't modify the original task ds when preprocessing data
In the case of using YAML anchors/aliases, YAML actually uses references to the duplicated object so any modifications to the original impacts later uses of the object. Fixes #13575
This commit is contained in:
parent
394430a61e
commit
af249b83e6
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ class Task(Base, Conditional, Taggable, Become):
|
|||
if 'vars' in ds:
|
||||
# _load_vars is defined in Base, and is used to load a dictionary
|
||||
# or list of dictionaries in a standard way
|
||||
new_ds['vars'] = self._load_vars(None, ds.pop('vars'))
|
||||
new_ds['vars'] = self._load_vars(None, ds.get('vars'))
|
||||
else:
|
||||
new_ds['vars'] = dict()
|
||||
|
||||
|
|
Loading…
Reference in a new issue