mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2026-08-25 01:05:36 +02:00
create pre and post hooks
* Move 'stop' services to pre-hook and post-hook. This way they will also be stopped and started when renewing. - remove service stop/start tasks - add pre-hook/post-hook templates - add pre-hook/pos-hook template tasks - create missing directories at first run - run pre and post hook during first manual run
This commit is contained in:
@@ -21,6 +21,12 @@ certbot_create_command: >-
|
||||
{{ certbot_script }} certonly --standalone --noninteractive --agree-tos
|
||||
--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
|
||||
|
||||
Reference in New Issue
Block a user