![Andrey Nikitin](/assets/img/avatar_default.png)
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
33 lines
699 B
Puppet
33 lines
699 B
Puppet
# == Class: jeepyb::manage_projects
|
|
|
|
class jeepyb::manage_projects(
|
|
$log_options = [
|
|
'compress',
|
|
'missingok',
|
|
'rotate 30',
|
|
'daily',
|
|
'notifempty',
|
|
'copytruncate',
|
|
],
|
|
$logfile = '/var/log/manage_projects.log',
|
|
$timeout = 900, # 15 minutes
|
|
) {
|
|
validate_array($log_options)
|
|
|
|
include ::jeepyb
|
|
|
|
exec { 'jeepyb_manage_projects':
|
|
command => "/usr/local/bin/manage-projects -v >> ${logfile} 2>&1",
|
|
timeout => $timeout, # 15 minutes
|
|
refreshonly => true,
|
|
logoutput => true,
|
|
}
|
|
|
|
include ::logrotate
|
|
logrotate::file { $logfile:
|
|
log => $logfile,
|
|
options => $log_options,
|
|
require => Exec['jeepyb_manage_projects'],
|
|
}
|
|
}
|