Add a module for ntpdate, die clock-skew die!

This commit is contained in:
R. Tyler Croy 2011-07-17 17:44:55 -07:00
parent 8fb79fa0cf
commit 9fc58fcb0a
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#
# Set up a simple ntpdate cron for all hosts to prevent clock skew
#
# This will run ntpdate and hit pool.ntp.org every morning at 4:15 am local
# time. Our clocks shouldn't be skewing too much in a 24 hour period
#
class ntpdate {
$ntpdate = $operatingsystem ? {
"CentOS" => ntp,
default => ntpdate
}
package {
$ntpdate :
alias => ntpdate,
ensure => installed;
}
cron {
ntpdate :
command => "/usr/sbin/ntpdate pool.ntp.org",
user => root,
minute => 15,
hour => 4,
ensure => present,
require => Package[$ntpdate];
}
}