puppet-jeepyb/manifests/fetch_remotes.pp
Andrey Nikitin eaac86d3f4 Order of the classes parameters is refactored
Order and intendation of those parameters are changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: I6dbfc2fd3769b174e493bd0392a652eca160f2bd
2016-03-21 12:51:28 +03:00

35 lines
757 B
Puppet

# == Class: jeepyb::fetch_remotes
class jeepyb::fetch_remotes(
$ensure = present,
$logfile = '/var/log/jeepyb_gerritfetchremotes.log',
$log_options = [
'compress',
'missingok',
'rotate 30',
'daily',
'notifempty',
'copytruncate',
],
$minute = '*/30',
$user = 'gerrit2',
) {
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'],
}
}