Puppet Class: r_profile::dns_client
- Defined in:
- manifests/dns_client.pp
Overview
R_profile::Dns_client
Support for configuring the DNS client (/etc/resolve.conf) and the Name Service Switch (/etc/nsswitch.conf and friends)
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'manifests/dns_client.pp', line 14
class r_profile::dns_client(
$search = hiera("r_profile::dns_client::search", undef),
$nameservers = hiera("r_profile::dns_client::nameservers", undef),
$options = hiera("r_profile::dns_client::options", undef),
$nss_entries = hiera("r_profile::dns_client::nss_entries", undef),
$install_defaults = hiera("r_profile::dns_client::install_defaults", false),
) {
# setup /etc/resolve.conf
if $nameservers or $install_defaults {
class { "resolv_conf":
search => $search,
nameservers => any2array($nameservers),
options => $options,
}
}
if $nss_entries or $install_defaults {
class { "name_service_switch":
entries => $nss_entries,
}
}
}
|