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
57
58
59
|
# File 'manifests/init.pp', line 25
class allknowingdns (
Array[Stdlib::IP::Address] $listen = ['::1','127.0.0.1'],
String[1] $network = 'UNSET',
String[1] $address = 'UNSET',
String[1] $address_prefix = 'ipv6-',
Hash $exceptions = {},
String[1] $upstream = 'UNSET',
String[1] $package_name = 'all-knowing-dns',
) {
if ! is_domain_name($address) {
fail("${address} is not a valid domaine name")
}
package { $package_name:
ensure => installed;
}
file { "/etc/${package_name}.conf":
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template("allknowingdns/${package_name}.conf.erb"),
notify => Service[$package_name],
require => Package[$package_name],
}
service { $package_name:
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => Package[$package_name];
}
}
|