Comment blocks now stay within three lines and explain only the non-obvious. Long histories, include examples, and commented-out code are gone. No task, key, or value changed; the only data change is comment text inside the generated unit files.
20 lines
668 B
YAML
20 lines
668 B
YAML
---
|
|
|
|
# A reload keeps live connections; a restart would drop every hosted site.
|
|
# The path is inside the container, not the host {{ caddyfile_path }}.
|
|
- name: Reload Caddy configuration
|
|
ansible.builtin.command: >-
|
|
podman exec {{ caddy_name }} caddy reload --config /etc/caddy/Caddyfile
|
|
changed_when: true
|
|
listen: "Reload Caddy"
|
|
|
|
# Quadlet cannot attach a network live, so Caddy must be recreated.
|
|
# Defined after the reload so the cheap reload runs first when both are notified.
|
|
- name: Restart Caddy
|
|
ansible.builtin.systemd_service:
|
|
name: "{{ caddy_name }}.service"
|
|
scope: user
|
|
state: restarted
|
|
daemon_reload: true
|
|
listen: Restart Caddy
|