feat: basic routing to caddy

This commit is contained in:
2025-06-22 04:02:13 -04:00
parent 06646e7ec7
commit b41d9f0e82
5 changed files with 48 additions and 9 deletions

19
playbooks/route.yml Normal file
View File

@@ -0,0 +1,19 @@
- name: "Create route to instance."
hosts: router
gather_facts: false
tasks:
- name: Modify base Caddyfile.
ansible.builtin.blockinfile:
dest: ~/app/caddy/etc/Caddyfile
marker: '# GITEA {mark}'
content: "{{ lookup('file', '../router/Caddyfile') }}"
notify:
- Restart Caddy.
handlers:
- name: Restart Caddy.
ansible.builtin.systemd_service:
name: container-caddy
state: restarted
enabled: true
scope: user