mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2026-04-17 15:11:10 +02:00
Change pre/post hook templates
This commit is contained in:
parent
1011113914
commit
60a6470a69
@ -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.
|
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
|
### Snap Installation
|
||||||
|
|
||||||
Beginning in December 2020, the Certbot maintainers decided to recommend installing Certbot from Snap rather than maintain scripts like `certbot-auto`.
|
Beginning in December 2020, the Certbot maintainers decided to recommend installing Certbot from Snap rather than maintain scripts like `certbot-auto`.
|
||||||
|
|||||||
@ -68,3 +68,6 @@ certbot_keep_updated: true
|
|||||||
|
|
||||||
# Where to put Certbot when installing from source.
|
# Where to put Certbot when installing from source.
|
||||||
certbot_dir: /opt/certbot
|
certbot_dir: /opt/certbot
|
||||||
|
|
||||||
|
certbot_pre_hook_template: stop_services.j2
|
||||||
|
certbot_post_hook_template: start_services.j2
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
- name: Create pre hook to stop services.
|
- name: Create pre hook to stop services.
|
||||||
template:
|
template:
|
||||||
src: stop_services.j2
|
src: "{{ certbot_pre_hook_template }}"
|
||||||
dest: /etc/letsencrypt/renewal-hooks/pre/stop_services
|
dest: /etc/letsencrypt/renewal-hooks/pre/stop_services
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
- name: Create post hook to start services.
|
- name: Create post hook to start services.
|
||||||
template:
|
template:
|
||||||
src: start_services.j2
|
src: "{{ certbot_post_hook_template }}"
|
||||||
dest: /etc/letsencrypt/renewal-hooks/post/start_services
|
dest: /etc/letsencrypt/renewal-hooks/post/start_services
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user