feat(traefik): allow exposure of dashboard via domain

This commit is contained in:
Bert-Jan Fikse 2026-01-22 14:01:23 +01:00
parent bce1daf5a6
commit 8e49b09fd6
Signed by: bert-jan
GPG key ID: C1E0AB516AC16D1A
5 changed files with 36 additions and 7 deletions

View file

@ -37,7 +37,6 @@
path: "{{ docker_volume_dir }}/config"
state: directory
mode: '0755'
when: traefik_mode == 'dmz'
- name: Create letsencrypt directory
file:
@ -66,6 +65,21 @@
notify: restart traefik
when: traefik_mode == 'dmz'
- name: Generate dashboard routing configuration
template:
src: dashboard.yml.j2
dest: "{{ docker_volume_dir }}/config/dashboard.yml"
mode: '0644'
notify: restart traefik
when: enable_dashboard | bool and dashboard_domain | length > 0
- name: Remove dashboard routing configuration when not needed
file:
path: "{{ docker_volume_dir }}/config/dashboard.yml"
state: absent
notify: restart traefik
when: not (enable_dashboard | bool) or dashboard_domain | length == 0
- name: Create docker-compose file for traefik
template:
src: docker-compose.yml.j2