Cookbooks
resolver
documentation
Resolver Config

resolver_config

Back to resource list

Introduced: v3.0.0

Actions

  • :set

Properties

NameTypeDefaultDescription
config_fileString/etc/resolv.confThe path to the resolver configuration file on disk
cookbookStringresolverCookbook to source configuration file template from
templateStringresolv.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
nameserversString, ArraynilThe DNS servers to configure for system name resolution
domainStringnilThe DNS domain name for the host
searchString, ArraynilThe DNS domain search list for the host
sortlistString, ArraynilThe DNS sort list for the host
optionsHashnilAdditional options to add to the resolver configuration file
atomic_updatetrue, falsetrueAllow to Ran atomic file update (Could be used when updating inside a container

Examples

resolver_config '/etc/resolv.conf' do
  nameservers ['1.1.1.1', '1.0.0.1']
  domain 'test.com'
  search ['test1.com', 'test2.com']
  options(
    'timeout' => 2
  )
end