nginx: reload server for renewed LE certificates

This commit is contained in:
Timotej Lazar 2024-10-22 10:02:26 +02:00
parent 21df85e97a
commit 82ca6a94c1
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,3 @@
#!/bin/sh
service nginx reload

View file

@ -29,6 +29,12 @@
cmd: certbot certonly --non-interactive --agree-tos --register-unsafely-without-email --webroot --webroot-path /srv/http -d {{ dns_name }} cmd: certbot certonly --non-interactive --agree-tos --register-unsafely-without-email --webroot --webroot-path /srv/http -d {{ dns_name }}
creates: '/etc/letsencrypt/renewal/{{ dns_name }}.conf' creates: '/etc/letsencrypt/renewal/{{ dns_name }}.conf'
- name: Install certificate renewal deployment hook
copy:
dest: /etc/letsencrypt/renewal-hooks/deploy/
src: reload-nginx.sh
mode: 0755
- name: Enable certbot renewal - name: Enable certbot renewal
cron: cron:
name: "certbot renew" name: "certbot renew"