puppet-jeepyb/manifests/fetch_remotes.pp
Colleen Murphy ce4349d156 Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. Also fix lint
errors caught by the puppet-lint-absolute_classname-check gem as well
as arrow alignment errors not caught before.

Change-Id: I6ee8cc21247258d9a37ce3304c207c4b637378f7
2015-08-03 18:35:43 -07:00

35 lines
741 B
Puppet

# == Class: jeepyb::fetch_remotes
class jeepyb::fetch_remotes(
$ensure = present,
$user = 'gerrit2',
$minute = '*/30',
$logfile = '/var/log/jeepyb_gerritfetchremotes.log',
$log_options = [
'compress',
'missingok',
'rotate 30',
'daily',
'notifempty',
'copytruncate',
],
) {
validate_array($log_options)
include ::jeepyb
cron { 'jeepyb_gerritfetchremotes':
ensure => $ensure,
user => $user,
minute => $minute,
command => "sleep $((RANDOM\%60+90)) && /usr/local/bin/manage-projects -v >> ${logfile} 2>&1",
}
include ::logrotate
logrotate::file { $logfile:
log => $logfile,
options => $log_options,
require => Cron['jeepyb_gerritfetchremotes'],
}
}