From 9ebbf1c3cdd0f192d12a2359ba681fdf59b259b4 Mon Sep 17 00:00:00 2001 From: Kuldip Madnani Date: Wed, 28 Mar 2018 16:24:11 -0500 Subject: [PATCH] Added a fix in openssl.conf template to check if IP of loadbalncer is available or not. --- roles/kubernetes/secrets/templates/openssl.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/secrets/templates/openssl.conf.j2 b/roles/kubernetes/secrets/templates/openssl.conf.j2 index adc875ba6..b02970d1e 100644 --- a/roles/kubernetes/secrets/templates/openssl.conf.j2 +++ b/roles/kubernetes/secrets/templates/openssl.conf.j2 @@ -26,7 +26,7 @@ IP.{{ 2 * loop.index }} = {{ hostvars[host]['ip'] | default(hostvars[host]['ansi {% endfor %} {% set idx = groups['kube-master'] | length | int * 2 + 1 %} IP.{{ idx }} = {{ kube_apiserver_ip }} -{% if loadbalancer_apiserver is defined %} +{% if loadbalancer_apiserver is defined and loadbalancer_apiserver.address is defined %} IP.{{ idx + 1 }} = {{ loadbalancer_apiserver.address }} {% set idx = idx + 1 %} {% endif %}