- name: Template caddy site ansible.builtin.template: src: caddy_site.conf.j2 dest: "{{ (caddy_config_path, svc.domain + '.conf') | path_join }}" mode: "0644" register: template_result - name: Register caddy site ansible.builtin.set_fact: managed_sites: "{{ managed_sites + [svc.domain + '.conf'] }}" - name: Reload caddy ansible.builtin.command: cmd: docker compose exec app sh -c "caddy validate --config /etc/caddy/Caddyfile && caddy reload --config /etc/caddy/Caddyfile" chdir: "{{ caddy_path }}" when: "'local-dev' != inventory_hostname" changed_when: template_result.changed