refactor: clean up directories and start standardized role names

This commit is contained in:
Jef Roosens 2025-04-24 17:01:03 +02:00
parent e2ef196a62
commit 2ae759025c
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
25 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1,35 @@
---
- name: Add Caddy GPG key
apt_key:
url: "https://dl.cloudsmith.io/public/caddy/stable/gpg.key"
state: present
- name: Add Caddy repositories
apt_repository:
repo: "{{ item }} https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main"
filename: 'caddy-stable'
state: present
with_items:
- deb
- deb-src
- name: Install Caddy
apt:
name: caddy
state: present
- name: Copy over Caddyfile
copy:
src: Caddyfile
dest: '/etc/caddy/Caddyfile'
owner: root
group: root
mode: '644'
notify: 'reload caddy'
- name: Ensure Caddy service is running & enabled
service:
name: caddy
state: started
enabled: true