Run hooks only for standalone mode

If the `certbot_create_method` is set to `webroot` the `stop_services` and `start_services` hook shouldn't be run.
This commit is contained in:
FAP 2023-02-01 15:13:09 +01:00 committed by GitHub
parent 3d55be0a54
commit d30ddd946a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,10 +37,10 @@ certbot_create_command: >-
{{ cert_item.webroot | default(certbot_webroot) if certbot_create_method == 'webroot' else '' }}
-d {{ cert_item.domains | join(',') }}
{{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services'
if certbot_create_standalone_stop_services
if certbot_create_method == 'standalone'
else '' }}
{{ '--post-hook /etc/letsencrypt/renewal-hooks/post/start_services'
if certbot_create_standalone_stop_services
if certbot_create_method == 'standalone'
else '' }}
certbot_create_standalone_stop_services: