From: Peter Palfrader <peter@palfrader.org>
Date: Sat, 26 Jun 2010 19:12:25 +0000 (+0200)
Subject: Run geodns sync at boot so we have the latest zonefiles
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5a90b360b0ae7601805314f59768da3583d053f6;p=dsa-puppet.git

Run geodns sync at boot so we have the latest zonefiles
---

diff --git a/modules/named/files/common/cron-geo b/modules/named/files/common/cron-geo
new file mode 100644
index 00000000..5e263a1c
--- /dev/null
+++ b/modules/named/files/common/cron-geo
@@ -0,0 +1,6 @@
+#
+# THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+# USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+#
+
+@reboot geodnssync sleep 1m && /etc/bind/geodns/trigger > /dev/null
diff --git a/modules/named/manifests/geodns.pp b/modules/named/manifests/geodns.pp
index 3a41b94d..d8155cdf 100644
--- a/modules/named/manifests/geodns.pp
+++ b/modules/named/manifests/geodns.pp
@@ -61,6 +61,12 @@ class named::geodns inherits named {
             group   => geodnssync,
             mode    => 440,
             ;
+        "/etc/cron.d/dsa-boot-geodnssync":
+            source  => [ "puppet:///named/per-host/$fqdn/cron-geo",
+                         "puppet:///named/common/cron-geo" ],
+            owner   => root,
+            group   => root,
+            ;
     }
 }