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