Resolver Systemd Resolved Config


Back to resource list

Create and manage the systemd-resolved configuration file. ( (opens in a new tab))

Introduced: v3.0.0


  • :set


config_fileString/etc/systemd/resolved.confThe path to the systemd-resolved configuration file on disk
cookbookStringresolverCookbook to source configuration file template from
templateStringresolved.conf.erbTemplate to use to generate the configuration file
ownerStringPlatform dependantOwner of the generated configuration file
groupStringPlatform dependantGroup of the generated configuration file
modeString'0644'Filemode of the generated configuration file
dnsString, ArraynilA list of IPv4 and IPv6 addresses to use as system DNS servers
fallback_dnsString, ArraynilA list of IPv4 and IPv6 addresses to use as fallback DNS servers
domainsString, ArraynilA list of DNS search domains for the host
llmnrTrue, False, StringnilControl Link-Local Multicast Name Resolution support (RFC 4795) on the host
multicast_dnsTrue, False, String'resolve'Control Multicast DNS support (RFC 6762) on the host
dnssecTrue, False, String'allow-downgrade'Control DNSSEC validation on the host
dns_over_tlsTrue, False, String'opportunistic'Control DNS-over-TLS on the host
cacheTrue, False, StringtrueControl DNS caching on the host
cache_from_localhostTrue, FalsefalseControl DNS caching of a result from a local address on the host
dns_stub_listenerTrue, False, StringnilControl the DNS stub listener on the host
dns_stub_listener_extraTrue, False, StringnilAdditional DNS stub sockets to listen on for the host
read_etc_hostsTrue, FalsetrueControl resolution of a hostname from the /etc/hosts file
resolve_unicast_single_labelTrue, FalsefalseControl resolution of A and AAAA queries for single-label names over classic DNS


resolver_systemd_resolved_config '/etc/systemd/resolved.conf' do
  dns ['', '', '2606:4700:4700::1111', '2606:4700:4700::1001']
  fallback_dns ',,2001:4860:4860::8888,2001:4860:4860::8844'
  domains ''