542f5584b7e6655ba3dd92935dabf1bf5fd2d85e
[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
46         exec {
47                 "bind9 restart":
48                         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
49                         refreshonly => true,
50                         ;
51         }
52 }
53
54 # vim: set fdm=marker ts=8 sw=8 et: