From 8d0d39bf1434abb63680a04ec6045eabfb2eb351 Mon Sep 17 00:00:00 2001 From: sepia Date: Tue, 29 Jul 2025 14:37:26 -0500 Subject: [PATCH] Restart caddy in deploy script when caddy config changes --- ansible/deploy.yml | 8 ++++++++ ansible/hosts.ini | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/deploy.yml b/ansible/deploy.yml index 3ef5e65..578dba2 100644 --- a/ansible/deploy.yml +++ b/ansible/deploy.yml @@ -68,6 +68,14 @@ owner: root group: root mode: "0644" + register: caddy_config_copy + + - name: Restart Caddy service if config changed + systemd: + name: caddy + state: restarted + daemon_reload: yes + when: caddy_config_copy.changed - name: Ensure Supervisor directory exists file: diff --git a/ansible/hosts.ini b/ansible/hosts.ini index 2794b15..2a3e189 100644 --- a/ansible/hosts.ini +++ b/ansible/hosts.ini @@ -1,3 +1,3 @@ # It is expected that you have sepiatonesxyz defined in your .ssh/config [production] -sepiatonesxyz ansible_host=sepiatonesxyz +sepiatonesxyz ansible_host=sepiatonesxyz ansible_python_interpreter=/usr/bin/python3.11