diff --git a/defaults/main.yml b/defaults/main.yml index 084f9a9..8542e3b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,9 +21,17 @@ certbot_certs: [] # - example3.com certbot_create_command: >- {{ certbot_script }} certonly --standalone --noninteractive --agree-tos - {% if certbot_cert_name %} --cert-name {{certbot_cert_name}} {%endif%} + {% if certbot_cert_name %} + --cert-name {{certbot_cert_name}} + {%endif%} --email {{ cert_item.email | default(certbot_admin_email) }} -d {{ cert_item.domains | join(',') }} + {{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services' + if certbot_create_standalone_stop_services + else '' }} + {{ '--post-hook /etc/letsencrypt/renewal-hooks/post/start_services' + if certbot_create_standalone_stop_services + else '' }} certbot_create_standalone_stop_services: - nginx