From e4ce321667a14f3748d79700317414df6f5735e7 Mon Sep 17 00:00:00 2001 From: Sven Ketelsen Date: Mon, 20 Nov 2023 15:46:22 +0100 Subject: [PATCH] DEV-1280 cockpit.mpmx.com --- host_vars/demompmx-cockpit-01/plain.yml | 8 ++++++++ roles/nginx/vars/main.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/host_vars/demompmx-cockpit-01/plain.yml b/host_vars/demompmx-cockpit-01/plain.yml index fdaea8e..806ad3e 100644 --- a/host_vars/demompmx-cockpit-01/plain.yml +++ b/host_vars/demompmx-cockpit-01/plain.yml @@ -4,3 +4,11 @@ hetzner_server_labels: "stage={{ stage }} service=cockpit" custom_stage_platform_users: - 'paul.zinke' + +# cockpit.mpmx.com := host europe dns +nginx_labels_additional: + - '"traefik.http.routers.cockpit-mpmx-com.service={{ nginx_id }}"' + - '"traefik.http.routers.cockpit-mpmx-com.rule=Host(`cockpit.mpmx.com`)"' + - '"traefik.http.routers.cockpit-mpmx-com.entrypoints=websecure"' + - '"traefik.http.routers.cockpit-mpmx-com.tls=true"' + - '"traefik.http.routers.cockpit-mpmx-com.tls.certresolver=letsencrypt-http"' diff --git a/roles/nginx/vars/main.yml b/roles/nginx/vars/main.yml index 88751f7..e85f960 100644 --- a/roles/nginx/vars/main.yml +++ b/roles/nginx/vars/main.yml @@ -24,7 +24,7 @@ nginx_docker: { name: "{{ nginx_id }}", image_name: "{{ nginx_image }}", image_version: alpine, - labels: "{{ nginx_labels }}", + labels: "{{ nginx_labels + ( nginx_labels_additional | default([])) }}", volumes: [ "{{ service_base_path }}/{{ inventory_hostname }}/dist:/usr/share/nginx/html", "{{ service_base_path }}/{{ inventory_hostname }}/conf/nginx.conf:/etc/nginx/conf.d/default.conf"