unbound module
[mirror/dsa-puppet.git] / modules / unbound / manifests / init.pp
1 class unbouned {
2     package {
3         unbound: ensure => installed;
4     }
5
6     exec {
7         "unbound restart":
8             path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
9             refreshonly => true,
10             ;
11     }
12     file {
13         "/var/lib/unbound":
14             ensure  => directory,
15             owner   => unbound,
16             group   => unbound,
17             mode    => 775,
18             ;
19         "/var/lib/unbound/root.key":
20             ensure  => present,
21             replace => false,
22             owner   => unbound,
23             group   => unbound,
24             mode    => 644,
25             # IANA root trust anchor, valid from 2010-07-15T00:00:00+00:00
26             # downloaded from https://data.iana.org/root-anchors/root-anchors.xml
27             content => ". IN DS 19036 8 2 49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5\n",
28             notify  => Exec["unbound restart"],
29             ;
30         "/var/lib/unbound/debian.org.key":
31             ensure  => present,
32             replace => false,
33             owner   => unbound,
34             group   => unbound,
35             mode    => 644,
36             # debian.org DS record, July 2010'
37             content => "debian.org. IN DS 5283 7 2 3DC987A633914C195D03EA129E92327630D3428E92884A5E97829A55701F9E8A\n",
38             notify  => Exec["unbound restart"],
39             ;
40         "/etc/unbound/unbound.conf":
41             content => template("unbound/unbound.conf.erb"),
42             require => Package["unbound"],
43             notify  => Exec["unbound restart"],
44             owner   => root,
45             group   => root,
46             ;
47     }
48 }
49
50 # vim:set et:
51 # vim:set sts=4 ts=4:
52 # vim:set shiftwidth=4: