Try to configure ntpdate for hosts with broken RTC
authorPeter Palfrader <peter@palfrader.org>
Sun, 15 Jan 2012 23:44:37 +0000 (00:44 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 15 Jan 2012 23:44:37 +0000 (00:44 +0100)
manifests/site.pp
modules/debian-org/misc/local.yaml
modules/ntpdate/files/etc-default-ntpdate [new file with mode: 0644]
modules/ntpdate/manifests/init.pp [new file with mode: 0644]

index a29bcc1..f94264c 100644 (file)
@@ -27,6 +27,7 @@ node default {
     include monit
     include apt-keys
     include ntp
+    include ntpdate
     include ssl
 
     include motd
index 9ef596d..ef7f2ae 100644 (file)
@@ -203,6 +203,8 @@ host_settings:
     - orff.debian.org
     - ravel.debian.org
     - busoni.debian.org
+  broken-rtc:
+    - sompek.debian.org
   buildd:
     - alain.debian.org
     - alkman.debian.org
diff --git a/modules/ntpdate/files/etc-default-ntpdate b/modules/ntpdate/files/etc-default-ntpdate
new file mode 100644 (file)
index 0000000..4607f64
--- /dev/null
@@ -0,0 +1,21 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+##
+
+# The settings in this file are used by the program ntpdate-debian, but not
+# by the upstream program ntpdate.
+
+# Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
+# so you only have to keep it in one place.
+NTPDATE_USE_NTP_CONF=no
+
+# List of NTP servers to use  (Separate multiple servers with spaces.)
+# Not used if NTPDATE_USE_NTP_CONF is yes.
+# merikanto    86.59.118.147
+# orff         194.177.211.209
+# ravel                206.12.19.5
+# busoni       140.211.15.34
+NTPSERVERS="86.59.118.147 194.177.211.209 206.12.19.5 140.211.15.34"
+
+# Additional options to pass to ntpdate
+NTPOPTIONS=""
diff --git a/modules/ntpdate/manifests/init.pp b/modules/ntpdate/manifests/init.pp
new file mode 100644 (file)
index 0000000..006daa5
--- /dev/null
@@ -0,0 +1,21 @@
+class ntpdate {
+    case getfromhash($nodeinfo, 'broken-rtc') {
+        true: {
+            package {
+                ntpdate: ensure => installed;
+                lockfile-progs: ensure => installed;
+            }
+            file {
+                "/etc/default/ntpdate":
+                    owner   => root,
+                    group   => root,
+                    mode    => 444,
+                    source  => [ "puppet:///modules/ntpdate/etc-default-ntpdate" ],
+                    ;
+            }
+        }
+    }
+}
+# vim:set et:
+# vim:set sts=4 ts=4:
+# vim:set shiftwidth=4: