16 lines
359 B
YAML
16 lines
359 B
YAML
- name: Generate Caddyfile from template
|
|
template:
|
|
src: Caddyfile.j2
|
|
dest: /etc/caddy/Caddyfile
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
- name: Format config in the server
|
|
ansible.builtin.command:
|
|
caddy fmt --overwrite --config /etc/caddy/Caddyfile
|
|
|
|
- name: Reload Caddy
|
|
ansible.builtin.systemd:
|
|
name: caddy
|
|
state: reloaded |