ansible-role-certbot icon indicating copy to clipboard operation
ansible-role-certbot copied to clipboard

FEATURE: Support for certbot plugins(Nginx,Apache)

Open DaisyDomergue opened this issue 1 year ago • 6 comments

Add support for options of installing and configuring certbot plugins. eg. install addition packages like python3-certbot-nginx add option nginx or apache for certbot_create_method certbot_create_method: nginx

modify certbot_create_command to user --certonly if in standalone or webroot else use --nginx or --apache

{{ certbot_script }} {{ 'certonly' if certbot_create_method == 'standalone' or certbot_create_method == 'webroot' else '' }} --{{ 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' if certbot_create_standalone_stop_services and certbot_create_method == 'standalone' else '' }} {{ '--post-hook /etc/letsencrypt/renewal-hooks/post/start_services' if certbot_create_standalone_stop_services and certbot_create_method == 'standalone' else '' }}

DaisyDomergue avatar Jan 09 '24 08:01 DaisyDomergue

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[bot] avatar May 13 '24 12:05 github-actions[bot]

@geerlingguy can you check on this

DaisyDomergue avatar May 13 '24 13:05 DaisyDomergue

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[bot] avatar Sep 23 '24 13:09 github-actions[bot]

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

github-actions[bot] avatar Nov 25 '24 13:11 github-actions[bot]

I ran into this today, needed to manually install python3-certbot-apache.

geerlingguy avatar May 05 '25 01:05 geerlingguy

+1, currently considering this role for automating nginx installations, and this is a missing feature (as having certbot stop nginx to do its job isnt exactly the most ideal)

will consider webroot as an alternative for now, but this feature would remove a lot of boilerplate to that degree

ShadowJonathan avatar May 28 '25 09:05 ShadowJonathan