ansible-collection-caddy/roles/caddy/tasks/main.yml
Nis Wechselberg 7185bebf09
Initial version of the caddy rule
Signed-off-by: Nis Wechselberg <enbewe@enbewe.de>
2024-06-17 17:27:27 +02:00

18 lines
380 B
YAML

---
- name: 'Install caddy package'
become: true
ansible.builtin.apt:
name: 'caddy'
state: 'present'
update_cache: true
cache_valid_time: 3600
- name: 'Generate Caddyfile'
become: true
ansible.builtin.template:
src: 'Caddyfile.j2'
dest: '/etc/caddy/Caddyfile'
owner: 'root'
group: 'root'
mode: 'u=rw,g=r,o=r'
notify: 'Restart caddy'