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

dns: Add support for Livermore's DNS server.

We don't have anycast DNS in Livermore, so this adds a parameter to base::dns,
a parameter that can be set via Hiera, to put Livermore's DNS server at (or
near) the top of the list.
parent 17f0ee77
No related branches found
No related tags found
No related merge requests found
unreleased (??)
[dns] Add support for Livermore, via Hiera. Set base::dns::livermore (in
Hiera) to true, and Livermore DNS gets added to resolv.conf (akkornel)
[dns] Add support for disabling Puppet management of resolv.conf, for
systems using DHCP (akkornel)
......
......@@ -3,10 +3,17 @@
# You may set $no_resolv_conf to prevent Puppet from overriding the system's
# resolv.conf file. This is helpful in DHCP environments.
# To enable, use Hiera to set base::dns::no_resolv_conf to "true".
# For Livermore sites, change base::dns::livermore to true, and the Livermore
# DNS server will be added above the standard DNS servers.
class base::dns(
$no_resolv_conf = false
$no_resolv_conf = false,
$livermore = false,
) {
if !$no_resolv_conf {
base::dns::resolv_conf { $::fqdn_lc: ensure => present }
base::dns::resolv_conf { $::fqdn_lc:
ensure => present,
livermore => $livermore,
}
}
}
......@@ -7,6 +7,7 @@ define base::dns::resolv_conf (
$dns_cache = 'NONE',
$first_dns_server = 'NONE',
$is_dns_server = false ,
$livermore = false ,
) {
if $::lsbdistcodename == 'santiago' {
$set_dns_options = true
......@@ -21,6 +22,10 @@ define base::dns::resolv_conf (
$set_dns_cache = false
}
if $livermore {
$set_livermore_dns = true
}
if $first_dns_server != 'NONE' {
$set_first_dns_server = true
} else {
......
......@@ -50,6 +50,10 @@ nameserver 127.0.0.1
<% if @set_first_dns_server -%>
nameserver <%= first_dns_server %>
<% end -%>
<% if @set_livermore_dns -%>
# Livermore DNS server (as of June 2015, there's no anycast in Livermore)
nameserver 204.63.227.68
<% end -%>
# Stanford anycast DNS servers
nameserver 171.64.1.234
nameserver 171.67.1.234
......
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