From 66531296522e3a48232f2901bd83b9fb1da2eb34 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Tue, 6 Sep 2022 16:48:28 +0200 Subject: [PATCH] :hammer: Refactor host statements to objects --- roles/nginx-https-ingress/templates/dehydrated-host.conf.j2 | 2 +- roles/nginx-https-ingress/templates/passthrough.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/nginx-https-ingress/templates/dehydrated-host.conf.j2 b/roles/nginx-https-ingress/templates/dehydrated-host.conf.j2 index 7647271..ac670b6 100644 --- a/roles/nginx-https-ingress/templates/dehydrated-host.conf.j2 +++ b/roles/nginx-https-ingress/templates/dehydrated-host.conf.j2 @@ -4,7 +4,7 @@ server { listen 80; listen [::]:80; - server_name {{ host }}; + server_name {{ host.name }}; location /.well-known/acme-challenge { proxy_pass http://{{ item.server }}.n39.eu:80; diff --git a/roles/nginx-https-ingress/templates/passthrough.conf.j2 b/roles/nginx-https-ingress/templates/passthrough.conf.j2 index b5deb41..b73691d 100644 --- a/roles/nginx-https-ingress/templates/passthrough.conf.j2 +++ b/roles/nginx-https-ingress/templates/passthrough.conf.j2 @@ -5,7 +5,7 @@ stream { {% for i in ingress %} {% if 'hosts' in i %} {% for host in i.hosts %} - {{ host }} {{ i.server }}; + {{ host.name }} {{ i.server }}; {% endfor %} {% endif %} {% endfor %}