Move the config file snippet to the top
[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                         source => "puppet:///files/etc/apt/sources.list.d/geoip.list",
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.geo":
21                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.geo",
22                                       "puppet:///geodns/common/named.conf.geo" ],
23                         require => Package["bind9"],
24                         notify  => Exec["bind9 restart"],
25                         owner   => root,
26                         group   => root,
27                         ;
28                 "/etc/bind/named.conf.acl":
29                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.acl",
30                                      "puppet:///geodns/common/named.conf.acl" ],
31                         require => Package["bind9"],
32                         notify  => Exec["bind9 restart"],
33                         owner   => root,
34                         group   => root,
35                         ;
36                 "/etc/bind/named.conf.options":
37                         source  => [ "puppet:///geodns/per-host/$fqdn/named.conf.options",
38                                      "puppet:///geodns/common/named.conf.options" ],
39                         require => Package["bind9"],
40                         notify  => Exec["bind9 restart"],
41                         owner   => root,
42                         group   => root,
43                         ;
44
45                 "/etc/bind/geodns":
46                         ensure  => directory,
47                         owner   => root,
48                         group   => geodnssync,
49                         mode    => 775,
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                 "/etc/ssh/userkeys/geodnssync":
67                         source  => [ "puppet:///geodns/per-host/$fqdn/authorized_keys",
68                                      "puppet:///geodns/common/authorized_keys" ],
69                         owner   => root,
70                         group   => geodnssync,
71                         mode    => 440,
72                         ;
73         }
74
75         exec {
76                 "bind9 restart":
77                         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
78                         refreshonly => true,
79                         ;
80         }
81 }
82
83 # vim: set fdm=marker ts=8 sw=8 et: