geerlingguy / ansible-role-certbot

Ansible Role - Certbot (for Let's Encrypt)
https://galaxy.ansible.com/geerlingguy/certbot/
MIT License
779 stars 346 forks source link

FEATURE: Support for certbot plugins(Nginx,Apache) #205

Open DaisyDomergue opened 8 months ago

DaisyDomergue commented 8 months ago

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 '' }}

github-actions[bot] commented 3 months ago

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.

DaisyDomergue commented 3 months ago

@geerlingguy can you check on this