X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fnamed%2Fmanifests%2Fgeodns.pp;h=649268a4439371a8bcc0db202bba9a499013259c;hb=18c0f13969295f1989cfad3130ba0b52ddcb51a2;hp=0a788231509f1da682fcf90faa8c49abc0d95d27;hpb=8a213c951f2ad1ee3e030b39039fc25cc7fc72f7;p=mirror%2Fdsa-puppet.git diff --git a/modules/named/manifests/geodns.pp b/modules/named/manifests/geodns.pp index 0a7882315..649268a44 100644 --- a/modules/named/manifests/geodns.pp +++ b/modules/named/manifests/geodns.pp @@ -3,12 +3,9 @@ class named::geodns inherits named { script => bind } - #site::aptrepo { 'geoip': - # url => 'http://db.debian.org/debian-admin', - # suite => 'lenny-bind-geoip', - # components => 'main', - #} - site::aptrepo { 'geoip': ensure => absent } + package { 'geoip-database': + ensure => installed, + } file { '/etc/bind/': ensure => directory, @@ -29,9 +26,16 @@ class named::geodns inherits named { source => 'puppet:///modules/named/common/named.conf.local', notify => Service['bind9'], } - file { '/etc/bind/named.conf.acl': - source => 'puppet:///modules/named/common/named.conf.acl', - notify => Service['bind9'], + if (versioncmp($::lsbmajdistrelease, '9') >= 0) { + file { '/etc/bind/named.conf.acl': + source => 'puppet:///modules/named/common/named.conf.acl', + notify => Service['bind9'], + } + } else { + file { '/etc/bind/named.conf.acl': + source => 'puppet:///modules/named/common/named.conf.acl.bind99', + notify => Service['bind9'], + } } file { '/etc/bind/geodns/zonefiles': ensure => directory, @@ -52,7 +56,11 @@ class named::geodns inherits named { group => geodnssync, mode => '0440', } - file { '/etc/cron.d/dsa-boot-geodnssync': - source => 'puppet:///modules/named/common/cron-geo' + file { '/etc/cron.d/dsa-boot-geodnssync': ensure => absent; } + concat::fragment { 'dsa-puppet-stuff--geodns-boot': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @(EOF) + @reboot geodnssync sleep 1m && /etc/bind/geodns/trigger > /dev/null + | EOF } }