-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathauthoritative.pp
41 lines (38 loc) · 1.09 KB
/
authoritative.pp
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
# powerdns::authoritative
class powerdns::authoritative (
$package_ensure = $powerdns::params::default_package_ensure,
Optional[Array[String]] $install_packages = $powerdns::install_packages,
) inherits powerdns {
# install the powerdns package
package { $powerdns::params::authoritative_package:
ensure => $package_ensure,
}
stdlib::ensure_packages($install_packages)
# install the right backend
case $powerdns::backend {
'mysql': {
include powerdns::backends::mysql
}
'bind': {
include powerdns::backends::bind
}
'postgresql': {
include powerdns::backends::postgresql
}
'ldap': {
include powerdns::backends::ldap
}
'sqlite': {
include powerdns::backends::sqlite
}
default: {
fail("${powerdns::backend} is not supported. We only support 'mysql', 'bind', 'postgresql', 'ldap' and 'sqlite' at the moment.")
}
}
service { 'pdns':
ensure => running,
name => $powerdns::params::authoritative_service,
enable => true,
require => Package[$powerdns::params::authoritative_package],
}
}