Skip to content
Snippets Groups Projects
Commit 9e96c3b7 authored by Karl Kornel's avatar Karl Kornel
Browse files

dns: Make dns_cache a class-level variable.

parent f34709b1
No related branches found
No related tags found
No related merge requests found
unreleased (??) unreleased (??)
[dns] Make dns_cache a class-level parameter, so that it can be set in
Hiera (as base::dns::dns_cache) (akkornel)
[dns] Add support for Livermore, via Hiera. Set base::dns::livermore (in [dns] Add support for Livermore, via Hiera. Set base::dns::livermore (in
Hiera) to true, and Livermore DNS gets added to resolv.conf (akkornel) Hiera) to true, and Livermore DNS gets added to resolv.conf (akkornel)
......
...@@ -4,15 +4,21 @@ ...@@ -4,15 +4,21 @@
# resolv.conf file. This is helpful in DHCP environments. # resolv.conf file. This is helpful in DHCP environments.
# To enable, use Hiera to set base::dns::no_resolv_conf to "true". # To enable, use Hiera to set base::dns::no_resolv_conf to "true".
# If you use a DNS cache, you can change base::dns::dns_cache in Hiera to true,
# and 127.0.0.1 will be set as the first nameserver.
# For Livermore sites, change base::dns::livermore to true, and the Livermore # For Livermore sites, change base::dns::livermore to true, and the Livermore
# DNS server will be added above the standard DNS servers. # DNS server will be added above the standard DNS servers. If dns_cache is
# also true, Livermore DNS will be second (right below 127.0.0.1).
class base::dns( class base::dns(
$no_resolv_conf = false, $no_resolv_conf = false,
$dns_cache = 'NONE',
$livermore = false, $livermore = false,
) { ) {
if !$no_resolv_conf { if !$no_resolv_conf {
base::dns::resolv_conf { $::fqdn_lc: base::dns::resolv_conf { $::fqdn_lc:
ensure => present, ensure => present,
dns_cache => $dns_cache,
livermore => $livermore, livermore => $livermore,
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment