geerlingguy / ansible-role-certbot

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

Run hooks only for standalone mode #192

Closed fapdash closed 1 year ago

fapdash commented 1 year ago

If the certbot_create_method is set to webroot the stop_services and start_services hook shouldn't be run.

As a workaround I had to set certbot_create_standalone_stop_services: false in my playbook, otherwise the task would be executed with the hooks added, even though they didn't get copied:

Unable to find pre-hook command /etc/letsencrypt/renewal-hooks/pre/stop_services in the PATH.

fapdash commented 1 year ago

Mh, linting error is in a file that I didn't touch.

Isuaven commented 1 year ago

Maybe better should be both checks? if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'

stale[bot] commented 1 year ago

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

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