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

Fix python version test with jinja2_native #204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mytlogos
Copy link

If the ansible configuration setting "jinja2_native" is enabled, ansible (or jinja2?) tries to preserve the type of the variable, e.g. by casting a string like '2' to a number 2.

This PR will a problem with this setting enabled with the variable bind_packages in vars/Debian.yml and vars/RedHat.yml, where package name gets selected, depending on the configured bind_python_version variable.

If jinja_native=true the value of bind_python_version would have been a number, selecting e.g. the non-existing python-netaddr package on some newer debian systems.
Preventively casting the value to a string prevents this without breaking previous behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant