From 157942a462b6c4474225ff636f28afaf3d628f3e Mon Sep 17 00:00:00 2001 From: Samuel Liu Date: Mon, 3 Jan 2022 16:06:59 +0800 Subject: [PATCH] fix resolved config (#8351) --- roles/kubernetes/preinstall/templates/resolved.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/preinstall/templates/resolved.conf.j2 b/roles/kubernetes/preinstall/templates/resolved.conf.j2 index 1858d4923..0cd28c961 100644 --- a/roles/kubernetes/preinstall/templates/resolved.conf.j2 +++ b/roles/kubernetes/preinstall/templates/resolved.conf.j2 @@ -1,5 +1,5 @@ [Resolve] -DNS={{ (nodelocaldns_ip |default(coredns_server) )| list | join(' ') }} +DNS={{ ([nodelocaldns_ip] if enable_nodelocaldns else coredns_server )| list | join(' ') }} FallbackDNS={{ ( nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }} Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }} #LLMNR=no