26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'manifests/master/time.pp', line 26
class classroom_legacy::master::time {
assert_private('This class should not be called directly')
if $classroom_legacy::offline {
# No point in repeatedly trying to sync if we don't have net
$cronjob = absent
# Set NTP service to consider itself authoritative
$servers = [$::servername]
}
else {
# Forcibly sync with a timeserver - handy for resuming class without slew
$cronjob = present
$servers = $classroom_legacy::time_servers
}
class { '::ntp':
servers => $servers,
udlc => true,
}
cron { 'synctime':
ensure => $cronjob,
command => "/usr/sbin/ntpdate -us ${classroom_legacy::time_servers[3]}",
minute => '*/5',
}
}
|