]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/geodns/manifests/init.pp
9df37135881cd42589f5d81387a0bbbb462ac327
[dsa-puppet.git] / modules / geodns / manifests / init.pp
1 class geodns {
2         include munin-node::bind
3
4         package {
5                 bind9: ensure => installed;
6         }
7
8         file {
9                 "/etc/apt/sources.list.d/geoip.list":
10                         content => template("debian-org/etc/apt/sources.list.d/geoip.list.erb"),
11                         notify  => Exec["apt-get update"],
12                         ;
13                 "/etc/bind/named.conf.local":
14                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.local",
15                                      "puppet:///geodns/common/named.conf.local" ],
16                         require => Package["bind9"],
17                         notify  => Exec["bind9 restart"],
18                         owner   => root,
19                         group   => root,
20                         ;
21                 "/etc/bind/named.conf.acl":
22                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.acl",
23                                      "puppet:///geodns/common/named.conf.acl" ],
24                         require => Package["bind9"],
25                         notify  => Exec["bind9 restart"],
26                         owner   => root,
27                         group   => root,
28                         ;
29                 "/etc/bind/named.conf.options":
30                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.options",
31                                      "puppet:///geodns/common/named.conf.options" ],
32                         require => Package["bind9"],
33                         notify  => Exec["bind9 restart"],
34                         owner   => root,
35                         group   => root,
36                         ;
37
38                 "/etc/bind/geodns":
39                         ensure  => directory,
40                         owner   => root,
41                         group   => geodnssync,
42                         mode    => 775,
43                         ;
44                 "/etc/bind/geodns/named.conf.geo":
45                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.geo",
46                                      "puppet:///geodns/common/named.conf.geo" ],
47                         require => Package["bind9"],
48                         notify  => Exec["bind9 restart"],
49                         owner   => root,
50                         group   => root,
51                         ;
52                 "/etc/bind/geodns/recvconf":
53                         source  => [ "puppet:///geodns/per-host/$fqdn/recvconf",
54                                      "puppet:///geodns/common/recvconf" ],
55                         owner   => root,
56                         group   => root,
57                         mode    => 555,
58                         ;
59                 "/etc/bind/geodns/recvconf.files":
60                         source  => [ "puppet:///geodns/per-host/$fqdn/recvconf.files",
61                                      "puppet:///geodns/common/recvconf.files" ],
62                         owner   => root,
63                         group   => root,
64                         mode    => 444,
65                         ;
66
67                 "/usr/share/GeoIP/GeoIPv6.dat":
68                         source  => [ "puppet:///geodns/per-host/$fqdn/GeoIPv6.dat",
69                                      "puppet:///geodns/common/GeoIPv6.dat" ],
70                         owner   => root,
71                         group   => root,
72                         mode    => 444,
73                         ;
74
75                 "/etc/ssh/userkeys/geodnssync":
76                         source  => [ "puppet:///geodns/per-host/$fqdn/authorized_keys",
77                                      "puppet:///geodns/common/authorized_keys" ],
78                         owner   => root,
79                         group   => geodnssync,
80                         mode    => 440,
81                         ;
82                 "/var/log/bind9":
83                         ensure  => directory,
84                         owner   => bind,
85                         group   => bind,
86                         mode    => 775,
87                         ;
88         }
89
90         exec {
91                 "bind9 restart":
92                         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
93                         refreshonly => true,
94                         ;
95         }
96 }
97
98 # vim: set fdm=marker ts=8 sw=8 et: