From 8dae2bb8253d3e5e4d00f66a8fb03685028d99d1 Mon Sep 17 00:00:00 2001 From: Phil Date: Fri, 25 Oct 2024 13:52:34 -0600 Subject: [PATCH] added handler to restart caddy on caddyfile change --- roles/docker/handlers/main.yml | 7 +++++++ roles/docker/tasks/caddy.yml | 1 + 2 files changed, 8 insertions(+) diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml index 3a5a230..a43f554 100644 --- a/roles/docker/handlers/main.yml +++ b/roles/docker/handlers/main.yml @@ -2,6 +2,13 @@ - name: restart glance community.docker.docker_compose_v2: project_src: /opt/stacks/glance + files: + - compose.yml + state: restarted + +- name: restart caddy + community.docker.docker_compose_v2: + project_src: /opt/stacks/caddy files: - compose.yml state: restarted \ No newline at end of file diff --git a/roles/docker/tasks/caddy.yml b/roles/docker/tasks/caddy.yml index 4e61847..1908288 100644 --- a/roles/docker/tasks/caddy.yml +++ b/roles/docker/tasks/caddy.yml @@ -11,6 +11,7 @@ dest: /opt/stacks/caddy/Caddyfile owner: root mode: 644 + notify: restart caddy - name: copy caddy compose file ansible.builtin.copy: