summaryrefslogtreecommitdiff
path: root/puppet/modules/unbound/manifests/anchor.pp
blob: e890722e12cacfe24c246e97c021b02bee1ce5d0 (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
# == Class: unbound::anchor
#
# The unbound::anchor class manages the "root.key" file, and creates it with
# the unbound-anchor program.
#
# === Examples
#
# include unbound::anchor
#
class unbound::anchor {
  include unbound::params

  file { $unbound::params::anchor:
    owner => $unbound::params::user,
    group => $unbound::params::group,
    mode => '0644',
    require => Exec[$unbound::params::unbound_anchor],
  }

  exec { $unbound::params::unbound_anchor:
    command => "${unbound::params::unbound_anchor} -a ${unbound::params::anchor}",
    creates => $unbound::params::anchor,
    returns => 1,
    before => Class['unbound::service'],
  }
}