Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Defines the DNS configuration of a system.
# RHEL6 requires a custom resolv.conf to deal with a single-threaded lookup
# bug which reduces performance to a crawl for services like sshd.
# TODO: remove EL6 custom resolv.conf when this bug is fixed.
class base::dns {
file { '/etc/resolv.conf':
source => $::lsbdistcodename ? {
'santiago' => 'puppet:///modules/base/dns/etc/resolv.conf.el6.withoutcache',
default => 'puppet:///modules/base/dns/etc/resolv.conf.withoutcache',
},
}
}
# This class overrides the above for a server that has local DNS caching.
class base::dns::cache inherits base::dns {
File['/etc/resolv.conf'] {
source => $::lsbdistcodename ? {
'santiago' => 'puppet:///modules/base/dns/etc/resolv.conf.el6.withcache',
default => 'puppet:///modules/base/dns/etc/resolv.conf.withcache',
},
}
# Stanford package for DNS caching.
package { 'stanford-dnscache':
ensure => present,
notify => Exec['chown dnslog:dnslog /var/log/dnscache'],
}
# This is required because ownership is wrong on reinstall of packages
# but not on initial install.
exec {'chown dnslog:dnslog /var/log/dnscache':
command => 'chown -R dnslog:dnslog /var/log/dnscache',
refreshonly => true,
}
}
# This class is for servers at Livermore. The resolv.conf puts the
# Livermore dns server first in the search list.
class base::dns::dr inherits base::dns {
File['/etc/resolv.conf'] {
source => 'puppet:///modules/base/dns/etc/resolv.conf.withoutcache-dr'
}
}
# This class is for servers at Livermore. The resolv.conf puts the
# Livermore dns server first in the search list. This must be used when
# base::dns::cache is getting included through another chain
# (Puppet lint sez that if base::dns::dr-cache inherits from base::dns::cache it
# should be called something like base::dns::cache::dr-cache (for laters).)
class base::dns::dr-cache inherits base::dns::cache {
File['/etc/resolv.conf'] {
source => 'puppet:///modules/base/dns/etc/resolv.conf.withcache-dr'
}
}