Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Script fails if certbot_create_extra_args is not defined since #109 #225

Open
m5p3nc3r opened this issue Oct 15, 2024 · 1 comment · May be fixed by #227
Open

Script fails if certbot_create_extra_args is not defined since #109 #225

m5p3nc3r opened this issue Oct 15, 2024 · 1 comment · May be fixed by #227
Labels

Comments

@m5p3nc3r
Copy link

I came back to use this script after months of inactivity, and I found the execution failed with:

TASK [geerlingguy.certbot : Generate new certificate if one doesn't exist.] ******************************************************************
fatal: [machine.localdomain]: FAILED! => {"msg": "The task includes an option with an undefined variable.. {{ certbot_script }} certonly --{{ certbot_create_method  }} {{ '--hsts' if certbot_hsts else '' }} {{ '--test-cert' if certbot_testmode else '' }} --noninteractive --agree-tos --email {{ cert_item.email | default(certbot_admin_email) }} {{ '--webroot-path ' if certbot_create_method == 'webroot'  else '' }} {{ cert_item.webroot | default(certbot_webroot) if certbot_create_method == 'webroot' else '' }} {{ certbot_create_extra_args }} -d {{ cert_item.domains | join(',') }} {{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services'\n  if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'\nelse '' }} {{ '--post-hook /etc/letsencrypt/renewal-hooks/post/start_services'\n  if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'\nelse '' }}: 'certbot_create_extra_args' is undefined\n\nThe error appears to be in '/home/{user}/.ansible/roles/geerlingguy.certbot/tasks/create-cert-standalone.yml': line 40, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Generate new certificate if one doesn't exist.\n  ^ here\n"}

On investigation, it seems to be after the addition of #109.

If I add certbot_create_extra_args: "" to my ansible configuration, the installation succeeds.

I believe the expectation is that the script should work if certbot_create_extra_args is not defined.

@almer-t almer-t linked a pull request Nov 2, 2024 that will close this issue
Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Feb 17, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant