summaryrefslogtreecommitdiff
path: root/manifests/params.pp
blob: fc043e2418c644b34f50c59200df857bb5fe39c8 (plain)
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
class unbound::params {
  case $::osfamily {
    'OpenBSD': {
      $package = 'unbound'
      $service = 'unbound'
      $hasstatus = true
      $dir = '/var/unbound/etc'
      $logfile = '/var/unbound/dev/log'
      $control_setup = '/usr/local/sbin/unbound-control-setup'
      $unbound_anchor = '/usr/local/sbin/unbound-anchor'
      $extended_service = 'unbound::service::openbsd'
      $unbound_flags = ''
      $user = '_unbound'
      $group = '_unbound'
    }
    'ubuntu', 'debian': {
      $package = 'unbound'
      $service = 'unbound'
      $hasstatus = true
      $dir = '/etc/unbound'
      $logfile = ''
      $control_setup = '/usr/sbin/unbound-control-setup'
      $unbound_anchor = '/usr/sbin/unbound-anchor'
      $unbound_flags = ''
      $user = 'unbound'
      $group = 'unbound'
    }
    default: {
      fail("Class[unbound] is not supported by your operating system: ${::operatingsystem}")
    }
  }

  $config = "${dir}/unbound.conf"
  $control_certs = [
    "${dir}/unbound_control.key",
    "${dir}/unbound_control.pem",
    "${dir}/unbound_server.key",
    "${dir}/unbound_server.pem",
  ]
  $anchor = "${dir}/root.key"
  $root_hints = "${dir}/named.cache"
}