Redirect puppet cron output to a log file
The _ansible_ output (mostly consisting of puppet output) is now sent to the puppet_run_all log file, but there is still quite a bit of output from ancilary parts of the cron job that just gets sent in email to infra-root every few minutes. Send it to a log file. Change-Id: I1f382b2d376cbfc2eff430c897bd3737fd585373
This commit is contained in:
parent
8e21ec389c
commit
2bca224b7c
@ -36,7 +36,7 @@ class openstack_project::puppetmaster (
|
||||
monthday => $puppetmaster_update_cron_interval[day],
|
||||
month => $puppetmaster_update_cron_interval[month],
|
||||
weekday => $puppetmaster_update_cron_interval[weekday],
|
||||
command => 'flock -n /var/run/puppet/puppet_run_all.lock bash /opt/system-config/production/run_all.sh',
|
||||
command => 'flock -n /var/run/puppet/puppet_run_all.lock bash /opt/system-config/production/run_all.sh >> /var/log/puppet_run_all_cron.log 2>&1',
|
||||
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
}
|
||||
|
||||
@ -54,6 +54,20 @@ class openstack_project::puppetmaster (
|
||||
require => Cron['updatepuppetmaster'],
|
||||
}
|
||||
|
||||
logrotate::file { 'updatepuppetmastercron':
|
||||
ensure => present,
|
||||
log => '/var/log/puppet_run_all_cron.log',
|
||||
options => ['compress',
|
||||
'copytruncate',
|
||||
'delaycompress',
|
||||
'missingok',
|
||||
'rotate 7',
|
||||
'daily',
|
||||
'notifempty',
|
||||
],
|
||||
require => Cron['updatepuppetmaster'],
|
||||
}
|
||||
|
||||
cron { 'deleteoldreports':
|
||||
user => 'root',
|
||||
hour => '3',
|
||||
|
Loading…
Reference in New Issue
Block a user