X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fnamed%2Fmanifests%2Fgeodns.pp;h=b00d727898a89992112ee3e3da0af9d608939b97;hb=49247ca52114710ffbc6c006aa52e182ea24144b;hp=3a41b94da87fb5c7b2153f10eddf54fe88d6ef53;hpb=12df216f8b140efd052fadb0db74f6c01205d089;p=mirror%2Fdsa-puppet.git diff --git a/modules/named/manifests/geodns.pp b/modules/named/manifests/geodns.pp index 3a41b94da..b00d72789 100644 --- a/modules/named/manifests/geodns.pp +++ b/modules/named/manifests/geodns.pp @@ -1,69 +1,53 @@ class named::geodns inherits named { - activate_munin_check { - "bind_views": script => bind; - } + munin::check { 'bind_views': + script => bind + } - file { - "/etc/bind/named.conf.options": - content => template("named/named.conf.options.erb"), - notify => Exec["bind9 reload"]; - "/etc/apt/sources.list.d/geoip.list": - content => template("debian-org/etc/apt/sources.list.d/geoip.list.erb"), - notify => Exec["apt-get update"], - ; - "/etc/bind/named.conf.local": - source => [ "puppet:///named/per-host/$fqdn/named.conf.local", - "puppet:///named/common/named.conf.local" ], - require => Package["bind9"], - notify => Exec["bind9 restart"], - owner => root, - group => root, - ; - "/etc/bind/named.conf.acl": - source => [ "puppet:///named/per-host/$fqdn/named.conf.acl", - "puppet:///named/common/named.conf.acl" ], - require => Package["bind9"], - notify => Exec["bind9 restart"], - owner => root, - group => root, - ; - "/etc/bind/geodns": - ensure => directory, - owner => root, - group => root, - mode => 755, - ; - "/etc/bind/geodns/zonefiles": - ensure => directory, - owner => geodnssync, - group => geodnssync, - mode => 755, - ; - "/etc/bind/geodns/named.conf.geo": - source => [ "puppet:///named/per-host/$fqdn/named.conf.geo", - "puppet:///named/common/named.conf.geo" ], - require => Package["bind9"], - notify => Exec["bind9 restart"], - owner => root, - group => root, - ; - "/etc/bind/geodns/trigger": - source => [ "puppet:///named/per-host/$fqdn/trigger", - "puppet:///named/common/trigger" ], - owner => root, - group => root, - mode => 555, - ; - "/etc/ssh/userkeys/geodnssync": - source => [ "puppet:///named/per-host/$fqdn/authorized_keys", - "puppet:///named/common/authorized_keys" ], - owner => root, - group => geodnssync, - mode => 440, - ; - } -} + site::aptrepo { 'geoip': + url => 'http://db.debian.org/debian-admin', + suite => 'lenny-bind-geoip', + components => 'main', + } -# vim:set et: -# vim:set sts=4 ts=4: -# vim:set shiftwidth=4: + file { '/etc/bind/': + ensure => directory, + group => bind, + mode => '2755', + require => Package['bind9'], + notify => Service['bind9'], + } + file { '/etc/bind/geodns': + ensure => directory, + mode => '0755', + } + file { '/etc/bind/named.conf.options': + content => template('named/named.conf.options.erb'), + } + file { '/etc/bind/named.conf.local': + source => 'puppet:///modules/named/common/named.conf.local', + } + file { '/etc/bind/named.conf.acl': + source => 'puppet:///modules/named/common/named.conf.acl', + } + file { '/etc/bind/geodns/zonefiles': + ensure => directory, + owner => geodnssync, + group => geodnssync, + mode => '2755', + } + file { '/etc/bind/geodns/named.conf.geo': + source => 'puppet:///modules/named/common/named.conf.geo', + } + file { '/etc/bind/geodns/trigger': + mode => '0555', + source => 'puppet:///modules/named/common/trigger', + } + file { '/etc/ssh/userkeys/geodnssync': + source => 'puppet:///modules/named/common/authorized_keys', + group => geodnssync, + mode => '0440', + } + file { '/etc/cron.d/dsa-boot-geodnssync': + source => 'puppet:///modules/named/common/cron-geo' + } +}