---
- name: Template caddy site
  ansible.builtin.template:
    src: caddy_site.conf.j2
    dest: "{{ (caddy_config_path, svc.domain + '.conf') | path_join }}"
    mode: "0644"
  notify:
    - Reload caddy

- name: Register caddy site
  ansible.builtin.set_fact:
    managed_sites: "{{ managed_sites + [svc.domain + '.conf'] }}"