Change pre/post hook templates

This commit is contained in:
Romina Brown 2026-04-15 16:12:26 -03:00
parent 1011113914
commit 60a6470a69
3 changed files with 10 additions and 2 deletions

View File

@ -74,6 +74,11 @@ Services that should be stopped while `certbot` runs it's own standalone server
These services will only be stopped the first time a new cert is generated.
certbot_pre_hook_template: stop_services.j2
certbot_post_hook_template: start_services.j2
If you need to stop and start services in another way, firstly you define these services in `certbot_create_standalone_stop_services` and then you must create your own templates for this mision and set its paths in `certbot_pre_hook_template` and `certbot_post_hook_template`.
### Snap Installation
Beginning in December 2020, the Certbot maintainers decided to recommend installing Certbot from Snap rather than maintain scripts like `certbot-auto`.

View File

@ -68,3 +68,6 @@ certbot_keep_updated: true
# Where to put Certbot when installing from source.
certbot_dir: /opt/certbot
certbot_pre_hook_template: stop_services.j2
certbot_post_hook_template: start_services.j2

View File

@ -21,7 +21,7 @@
- name: Create pre hook to stop services.
template:
src: stop_services.j2
src: "{{ certbot_pre_hook_template }}"
dest: /etc/letsencrypt/renewal-hooks/pre/stop_services
owner: root
group: root
@ -32,7 +32,7 @@
- name: Create post hook to start services.
template:
src: start_services.j2
src: "{{ certbot_post_hook_template }}"
dest: /etc/letsencrypt/renewal-hooks/post/start_services
owner: root
group: root