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: cookiecutter yes no questions result in boolean #168

Open
JonasPammer opened this issue Feb 19, 2024 · 0 comments
Open

fix: cookiecutter yes no questions result in boolean #168

JonasPammer opened this issue Feb 19, 2024 · 0 comments

Comments

@JonasPammer
Copy link
Owner

even though shown as "[y/n]" (cruft version 2.15.0, cookiecutter version 2.5.0), it gets converted to true / false as seen here: JonasPammer/ansible-role-gitlab@15735b3

at least it does that "in newer versions". to support older cruft's to update, still check if it's "y" for use_renovate and "True" for "ansible_user_needs_to_become" (e.g.)

affected code:

potential solution?:

{%- if cookiecutter.use_renovate is sameas true or cookiecutter.use_renovate == "y" %}

also potential solution to fix this for older crufts too:

{%- if cookiecutter.ansible_user_needs_to_become %}

{%- if cookiecutter.ansible_user_needs_to_become is sameas true or cookiecutter.ansible_user_needs_to_become == "True" %}
JonasPammer added a commit to JonasPammer/ansible-role-gitlab that referenced this issue Feb 19, 2024
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

No branches or pull requests

1 participant