From fc3d9845d6ac7cda7df7f9b4a6a4dfc331734bc9 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Sun, 19 Mar 2023 15:17:02 +0100 Subject: [PATCH] Fix undeterministic node-selection but uses group --- kubernetes/templates/k3s/server/config.yaml.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/templates/k3s/server/config.yaml.jinja2 b/kubernetes/templates/k3s/server/config.yaml.jinja2 index 4ea7d95..8cea4fc 100644 --- a/kubernetes/templates/k3s/server/config.yaml.jinja2 +++ b/kubernetes/templates/k3s/server/config.yaml.jinja2 @@ -3,7 +3,7 @@ # Initialize with internal etcd cluster-init: true {% else %} -server: https://{{ groups['kubernetes'][0] }}:6443 +server: https://{{ hostvars[groups['kubernetes'][0]]['nodeip_ipv4'] }}:6443 {% endif %} token: '{{ kubernetes.token }}'