ansible/playbooks/apps/caddy.yaml

20 lines
425 B
YAML

---
- name: Update caddy config
hosts: servers
gather_facts: false
become: true
tasks:
- name: Write Caddyfile
ansible.builtin.copy:
src: files/Caddyfile
dest: /etc/caddy/Caddyfile
mode: "0644"
owner: root
group: root
notify:
- Reload caddy
handlers:
- name: Reload caddy
ansible.builtin.service:
name: caddy
state: reloaded