diff options
Diffstat (limited to 'ansible/roles/certbot/tasks/main.yml')
-rw-r--r-- | ansible/roles/certbot/tasks/main.yml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ansible/roles/certbot/tasks/main.yml b/ansible/roles/certbot/tasks/main.yml index c6df7a1..e6691a1 100644 --- a/ansible/roles/certbot/tasks/main.yml +++ b/ansible/roles/certbot/tasks/main.yml @@ -76,14 +76,24 @@ - role::certbot -- name: Reload nginx after certificate renewal +# BEGIN temporary cleanup task +- name: Remove old hook file + ansible.builtin.file: + path: /etc/letsencrypt/renewal-hooks/deploy/reload-nginx + state: absent +# END temporary cleanup task + +- name: Reload services after certificate renewal ansible.builtin.copy: content: | #!/bin/sh set -ex systemctl reload nginx - dest: /etc/letsencrypt/renewal-hooks/deploy/reload-nginx + {% if certbot_reload_services %} + systemctl reload {{ certbot_reload_services | join(" ") }} + {% endif %} + dest: /etc/letsencrypt/renewal-hooks/deploy/reload-services owner: root group: root mode: "0500" |