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

Handle bare exception case from nested jinja2 vars #4315

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

cavcrosby
Copy link
Contributor

@cavcrosby cavcrosby commented Sep 6, 2024

Fixes #4298

I sometimes found that nested jinja2 variables cause the base exception to be thrown from an instance of AnsibleJ2Vars (which is used within the Templar.do_template method). This can happen I believe from the call to return self._templar.template(variable) within AnsibleJ2Vars. Through testing, I found that Python version 3.10 doesn't reproduce this issue, but 3.11 and 3.12 do.

Copy link

@ssbarnea ssbarnea merged commit 9d63816 into ansible:main Sep 19, 2024
26 checks passed
@cavcrosby cavcrosby deleted the handle-exception-nested-vars branch September 21, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
3 participants