aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-07-16 23:51:34 +0100
committerGravatar Chris Lovering <[email protected]>2024-07-16 23:51:34 +0100
commita3055c9ba39fb4ae6d1beb0be8d8d97b173a77bb (patch)
tree47ab4606039258f164b2b75693d6d204ff2687f1 /ansible/roles
parentDocument current redis database usage (diff)
Add certbot post deploy hook to reload nginx
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/certbot/tasks/main.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/ansible/roles/certbot/tasks/main.yml b/ansible/roles/certbot/tasks/main.yml
index 8aeae92..345dd5d 100644
--- a/ansible/roles/certbot/tasks/main.yml
+++ b/ansible/roles/certbot/tasks/main.yml
@@ -74,3 +74,16 @@
when: "inventory_hostname in certbot_cert_users"
tags:
- role::certbot
+
+
+- name: Reload nginx after certificate renewal
+ ansible.builtin.copy:
+ content: |
+ #!/bin/sh
+ set -ex
+
+ systemctl reload nginx
+ dest: /etc/letsencrypt/renewal-hooks/deploy/reload-nginx
+ owner: root
+ group: root
+ mode: "0500"