-
Notifications
You must be signed in to change notification settings - Fork 79
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
patch podman login: omit certdir by default #250
base: main
Are you sure you want to change the base?
Conversation
Note: I have also enabled |
Not sure why the ack step failed :) |
Also not sure how to bypass the linter's comments about the admittedly ugly line this introduces. Advise welcome! |
{% if lookup('env', 'DOCKER_CERT_PATH') %} | ||
{{ item.cert_path | default(lookup('env', 'DOCKER_CERT_PATH') + '/cert.pem') }} | ||
{% endif %} | ||
{% if lookup('env', 'DOCKER_CERT_PATH') %}{{ item.cert_path | default(lookup('env', 'DOCKER_CERT_PATH') + '/cert.pem') }}{% else %}{{ item.cert_path | default(omit) }}{% endif %} # noqa yaml[line-length] jinja[spacing] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try with noqa:
instead of noqa
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, why do you need to ignore the line-length ? I've not checked but the line is using '>-' so you should be able to split over the line the same way it was before your change. It would be easier to read and no error from the lint.
Side note: it would be interesting to check if it's possible to reproduce that linting issue and ask -lint developers as it would be surprising to not be able to ignore an error.
Resolves #248
This is an alternative to #249. Instead of reverting to the use of
ansible.builtin.command
, we can also usedefault(omit, true)
in the if-statement in the template being passed as value to thecertdir
argument.However, this only seems to work when this if-statement is on one line (presumably, the template resulting template is not empty but contains newlines when that is not the case).