Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.9: template lookup: fix regression when templating hostvars (#64070) #64517

Merged
merged 1 commit into from Nov 12, 2019

Conversation

mkrizek
Copy link
Contributor

@mkrizek mkrizek commented Nov 6, 2019

SUMMARY

This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes #63940

Backport of #64070

(cherry picked from commit cd8ce16)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

template lookup

This fixes a regression that was caused by switching from copy() to
deepcopy() when 'saving' variables before templating. Since HostVars
did not implement the __deepcopy__() method, deepcopy returned incorrect
results when host vars were present in the variables.

Fixes ansible#63940

(cherry picked from commit cd8ce16)
@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 6, 2019
@mattclay mattclay added the backport_verified This PR has been verified as a backport of a merged devel PR. label Nov 7, 2019
@mattclay mattclay merged commit c44cd68 into ansible:stable-2.9 Nov 12, 2019
@mkrizek mkrizek deleted the backport/2.9/64070 branch November 12, 2019 18:56
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Nov 13, 2019
@ansible ansible locked and limited conversation to collaborators Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 backport_verified This PR has been verified as a backport of a merged devel PR. backport This PR does not target the devel branch. bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants