2010-10-06 14:06:50 +02:00
|
|
|
class apt::cron::base {
|
2010-12-07 19:18:41 +01:00
|
|
|
|
2013-01-02 14:12:11 +01:00
|
|
|
package { 'cron-apt': ensure => installed }
|
2010-12-11 15:08:17 +01:00
|
|
|
|
|
|
|
case $apt_cron_hours {
|
|
|
|
'': {}
|
|
|
|
default: {
|
|
|
|
# cron-apt defaults to run every night at 4 o'clock
|
|
|
|
# so we try not to run at the same time.
|
|
|
|
cron { 'apt_cron_every_N_hours':
|
|
|
|
command => 'test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt',
|
|
|
|
user => root,
|
|
|
|
hour => "${apt_cron_hours}",
|
|
|
|
minute => 10,
|
|
|
|
require => Package['cron-apt'],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-06 14:06:50 +02:00
|
|
|
}
|