From 9b44d213c33b1fd9c9c23a1eb0d23054b207cca3 Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Tue, 29 Mar 2022 09:19:31 +0200 Subject: [PATCH] remove hardcoded hostnames --- templates/traefik-keycloak.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/traefik-keycloak.yaml b/templates/traefik-keycloak.yaml index 88862b7..785901c 100644 --- a/templates/traefik-keycloak.yaml +++ b/templates/traefik-keycloak.yaml @@ -1,14 +1,14 @@ http: routers: keycloak-http: - rule: "Host(`lb.itix.lab`)" + rule: "Host(`{{ inventory_hostname }}`)" entryPoints: - http - https middlewares: service: "keycloak" keycloak-https: - rule: "Host(`lb.itix.lab`)" + rule: "Host(`{{ inventory_hostname }}`)" entryPoints: - http - https @@ -23,9 +23,9 @@ http: interval: "10s" timeout: "3s" servers: - - url: "http://sso1.itix.lab:8080" - - url: "http://sso2.itix.lab:8080" - - url: "http://sso3.itix.lab:8080" +{% for host in groups.keycloak %} + - url: "http://{{ host }}:8080" +{% endfor %} # Sticky session is required for users to login sticky: cookie: {}