Drop references to long-gone db.d.o repos
[mirror/dsa-puppet.git] / modules / named / manifests / geodns.pp
1 class named::geodns inherits named {
2         munin::check { 'bind_views':
3                 script => bind
4         }
5
6         package { 'geoip-database':
7                 ensure => installed,
8         }
9
10         file { '/etc/bind/':
11                 ensure  => directory,
12                 group  => bind,
13                 mode   => '2755',
14                 require => Package['bind9'],
15                 notify  => Service['bind9'],
16         }
17         file { '/etc/bind/geodns':
18                 ensure => directory,
19                 mode   => '0755',
20         }
21         file { '/etc/bind/named.conf.options':
22                 content => template('named/named.conf.options.erb'),
23                 notify  => Service['bind9'],
24         }
25         file { '/etc/bind/named.conf.local':
26                 source => 'puppet:///modules/named/common/named.conf.local',
27                 notify  => Service['bind9'],
28         }
29         if (versioncmp($::lsbmajdistrelease, '9') >= 0) {
30                 file { '/etc/bind/named.conf.acl':
31                         source => 'puppet:///modules/named/common/named.conf.acl',
32                         notify  => Service['bind9'],
33                 }
34         } else {
35                 file { '/etc/bind/named.conf.acl':
36                         source => 'puppet:///modules/named/common/named.conf.acl.bind99',
37                         notify  => Service['bind9'],
38                 }
39         }
40         file { '/etc/bind/geodns/zonefiles':
41                 ensure => directory,
42                 owner  => geodnssync,
43                 group  => geodnssync,
44                 mode   => '2755',
45         }
46         file { '/etc/bind/geodns/named.conf.geo':
47                 source => 'puppet:///modules/named/common/named.conf.geo',
48                 notify  => Service['bind9'],
49         }
50         file { '/etc/bind/geodns/trigger':
51                 mode   => '0555',
52                 source => 'puppet:///modules/named/common/trigger',
53         }
54         file { '/etc/ssh/userkeys/geodnssync':
55                 source => 'puppet:///modules/named/common/authorized_keys',
56                 group  => geodnssync,
57                 mode   => '0440',
58         }
59         file { '/etc/cron.d/dsa-boot-geodnssync': ensure => absent; }
60         concat::fragment { 'dsa-puppet-stuff--geodns-boot':
61                 target => '/etc/cron.d/dsa-puppet-stuff',
62                 content  => @(EOF)
63                         @reboot geodnssync sleep 1m && /etc/bind/geodns/trigger > /dev/null
64                         | EOF
65         }
66 }