diff options
author | James Cammarata <jimi@sngx.net> | 2016-06-27 18:57:24 -0500 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2016-06-27 18:57:24 -0500 |
commit | 0e3cbd80cf3f88ffa914a62d020b1376705bcfde (patch) | |
tree | 656cdef8f127d447a6590788ca6148294d0c54eb | |
parent | b361bf90d70aa82b95150ab8222768f1b055b0bc (diff) | |
download | ansible-issue_13575.tar.gz |
Don't modify the original task ds when preprocessing dataissue_13575
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
-rw-r--r-- | lib/ansible/playbook/task.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index c55f32b2c4..36a511312d 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -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() |