diff options
Diffstat (limited to 'manifests/cron/base.pp')
-rw-r--r-- | manifests/cron/base.pp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp new file mode 100644 index 00000000..39fc3061 --- /dev/null +++ b/manifests/cron/base.pp @@ -0,0 +1,20 @@ +class apt::cron::base { + + package { 'cron-apt': ensure => installed } + + 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'], + } + } + } + +} |