Add nodelocaldns only if it is enabled (#7731)
parent
dfdebda0b6
commit
30d9882851
|
@ -147,7 +147,7 @@
|
|||
- name: generate nameservers to resolvconf
|
||||
set_fact:
|
||||
nameserverentries:
|
||||
nameserver {{ ( coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(',nameserver ') }}
|
||||
nameserver {{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(',nameserver ') }}
|
||||
supersede_nameserver:
|
||||
supersede domain-name-servers {{ ( coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[Resolve]
|
||||
DNS={{ coredns_server | list | join(' ') }}
|
||||
DNS={{ (nodelocaldns_ip |default(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
|
||||
|
|
Loading…
Reference in New Issue