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
|
# File 'manifests/network/dns.pp', line 1
class system::network::dns (
$config = undef,
) {
if $config {
validate_hash($config)
$_config = $config
}
else {
$_config = hiera_hash('system::network::dns', undef)
}
if $_config {
$domains = $_config['domains']
$nameservers = $_config['nameservers']
$options = $_config['options']
validate_array($domains)
validate_array($nameservers)
validate_array($options)
file { '/etc/resolv.conf':
ensure => 'present',
owner => 'root',
group => 'root',
mode => '0644',
content => template('system/network/dns.erb'),
}
}
}
|