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

Extend jinja2 nested undefined support to keys/indices #55094

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

sivel
Copy link
Member

@sivel sivel commented Apr 10, 2019

SUMMARY

Currently the AnsibleUndefined class only implements nested undefined support when using dot notation. This PR extends this functionality to keys/indices via subscript/bracket notation.

ISSUE TYPE
  • Bugfix Pull Request
  • Feature Pull Request
COMPONENT NAME

lib/ansible/template/init.py

ADDITIONAL INFORMATION

@sivel
Copy link
Member Author

sivel commented Apr 10, 2019

cc @felixfontein

@sivel sivel requested a review from bcoca April 10, 2019 14:33
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Is there a way to still get this into 2.8? The new undefined handling would be way more smooth with this.

@sivel
Copy link
Member Author

sivel commented Apr 10, 2019

@felixfontein I have gotten approval for merging this as a bugfix for the 2.8 release. So It will go in momentarily.

@sivel sivel merged commit e89f8ba into ansible:devel Apr 10, 2019
@felixfontein
Copy link
Contributor

cc @agaffney

@felixfontein
Copy link
Contributor

@sivel awesome! :)

@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants