2019-11-06 19:33:52 +08:00
|
|
|
[Resolve]
|
2023-12-21 16:52:14 +08:00
|
|
|
{% if not dns_early and dns_late %}
|
2022-01-03 16:06:59 +08:00
|
|
|
DNS={{ ([nodelocaldns_ip] if enable_nodelocaldns else coredns_server )| list | join(' ') }}
|
2022-03-14 17:08:22 +08:00
|
|
|
{% endif %}
|
|
|
|
FallbackDNS={{ ( upstream_dns_servers|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
|
2023-12-21 16:52:14 +08:00
|
|
|
{% if remove_default_searchdomains and searchdomains|default([])|length != 0 %}
|
2022-09-24 01:28:26 +08:00
|
|
|
Domains={{ searchdomains|default([]) | join(' ') }}
|
2023-10-31 00:37:52 +08:00
|
|
|
{% else %}
|
|
|
|
Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }}
|
2022-09-24 01:28:26 +08:00
|
|
|
{% endif %}
|
2019-11-06 19:33:52 +08:00
|
|
|
DNSSEC=no
|
|
|
|
Cache=no-negative
|
2023-05-26 01:04:51 +08:00
|
|
|
{% if systemd_resolved_disable_stub_listener | bool %}
|
2022-08-18 15:56:49 +08:00
|
|
|
DNSStubListener=no
|
|
|
|
{% endif %}
|