Puppet Class: psick::time::ntpdate
- Defined in:
- manifests/time/ntpdate.pp
Overview
This class installs and runs once ntpdate
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'manifests/time/ntpdate.pp', line 2
class psick::time::ntpdate (
# If given a ntpdate cron jon is scheduled. Format: * * * * *
Optional[String] $crontab = undef,
# Server to sync to (just one)
String $ntp_server = 'pool.ntp.org',
Boolean $manage = $psick::manage,
Boolean $noop_manage = $psick::noop_manage,
Boolean $noop_value = $psick::noop_value,
) {
if $manage {
if $noop_manage {
noop($noop_value)
}
tp::install { 'ntpdate': }
exec { "ntpdate -s ${ntp_server}":
subscribe => Tp::Install['ntpdate'],
refreshonly => true,
path => $facts['path'],
}
if $crontab and $facts['virtual'] != 'docker' {
file { '/etc/cron.d/ntpdate':
content => "${crontab} root ntpdate -s ${ntp_server}\n",
}
}
}
}
|