Newer
Older
# Change the time that daily cron jobs run, primarily so that log periods will
# be close to calendar days. Also remove anacron, since we don't use it on
# servers.
package { 'anacron': ensure => absent }
if ($::operatingsystem =~ /^(Debian|Ubuntu)$/) {
$crond = 'cron'
}
elsif ($::operatingsystem =~ /^(CentOS|RedHat)$/) {
$crond = 'crond'
if ($::lsbmajdistrelease == '6') {
package {
'cronie-noanacron': ensure => present;
'cronie-anacron': ensure => absent;
}
}
file { [ '/etc/cron.d/dailyjobs', '/etc/cron.d/0hourly' ]:
ensure => absent
}
}
else {
fail "Unknown operatingsystem in base::cron: ${::operatingsystem}"
}
service { $crond:
ensure => running,
enable => true,
}
content => template('base/cron/crontab.erb'),