Post renewal hook for certbot to reload dovecot and postfix
This commit is contained in:
parent
43053e57f9
commit
256d2d5df4
2 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
{{ ansible_manged | comment }}
|
||||||
|
# Reload Postcot and Dovecot after certificates are (re)generated
|
||||||
|
|
||||||
|
systemctl reload postfix
|
||||||
|
systemctl reload dovecot
|
|
@ -22,3 +22,16 @@
|
||||||
dest: "/etc/letsencrypt/conf.d/{{ certbot.certname }}.ini"
|
dest: "/etc/letsencrypt/conf.d/{{ certbot.certname }}.ini"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: Generate certificates
|
notify: Generate certificates
|
||||||
|
|
||||||
|
- name: Make sure let's encrypt renewal-hooks exists
|
||||||
|
file:
|
||||||
|
path: /etc/letsencrypt/renewal-hooks/deploy
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Reload Postfix and Dovecot after certificate renewal
|
||||||
|
template:
|
||||||
|
src: letsencrypt/renewal-hooks/deploy/reload-mail-services.sh.j2
|
||||||
|
dest: /etc/letsencrypt/renewal-hooks/deploy/reload-mail-services.sh
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
# TODO: add motd
|
||||||
|
|
Loading…
Reference in a new issue