ansible/playbooks/apps/caddy.yaml

21 lines
425 B
YAML
Raw Normal View History

2024-10-10 23:30:37 +02:00
---
- name: Update caddy config
2024-10-10 22:25:30 +02:00
hosts: servers
2024-10-10 23:55:47 +02:00
gather_facts: false
2024-10-10 22:25:30 +02:00
become: true
tasks:
2024-10-10 23:30:37 +02:00
- name: Write Caddyfile
ansible.builtin.copy:
src: files/Caddyfile
2024-10-10 22:25:30 +02:00
dest: /etc/caddy/Caddyfile
2024-10-10 23:30:37 +02:00
mode: "0644"
owner: root
group: root
2024-10-10 22:25:30 +02:00
notify:
2024-10-10 23:30:37 +02:00
- Reload caddy
2024-10-10 22:25:30 +02:00
handlers:
2024-10-10 23:30:37 +02:00
- name: Reload caddy
ansible.builtin.service:
2024-10-10 22:25:30 +02:00
name: caddy
state: reloaded