Add auto-cleaning for caddy sites

This commit is contained in:
Tobias Reisinger 2024-10-07 23:58:56 +02:00
parent 7a1a8a348a
commit aa9c76a622
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
7 changed files with 40 additions and 14 deletions
roles
always/handlers
extra_services

View file

@ -1,7 +1,3 @@
---
- name: Reload caddy
ansible.builtin.command:
cmd: docker compose exec app sh -c "caddy validate --config /etc/caddy/Caddyfile && caddy reload --config /etc/caddy/Caddyfile"
chdir: "{{ caddy_path }}"
when: "'local-dev' != inventory_hostname"
changed_when: true
ansible.builtin.include_tasks: tasks/reload-caddy.yml

View file

@ -3,9 +3,8 @@
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy extra services
vars:
svc: "{{ extra_services_svc }}"
block:
- name: Import tasks to template the site and functions for the reverse proxy
ansible.builtin.include_tasks: tasks/steps/template-site-config.yml
loop: "{{ extra_services_all }}"
loop_control:
loop_var: svc

View file

@ -1,2 +1,4 @@
---
extra_services_all: "{{ vault_extra_services }}"
extra_services_svc:
name: extra_services
extra_svcs: "{{ vault_extra_services }}"