Add some system logging to run_all

When we want to watch run_all happen, it's hard, because there is
no logging. To fix that - make there be some logging. Then, rotate
the logs.

Change-Id: I0eed7aeeec0ff21e58d57d6385cc59b74bbf31fb
This commit is contained in:
Monty Taylor 2014-04-18 13:53:36 -07:00
parent ba4f813ebb
commit 21ab83c0b5
2 changed files with 17 additions and 1 deletions

View File

@ -5,6 +5,7 @@ class openstack_project::puppetmaster (
$override_list = [],
$sysadmins = []
) {
include logrotate
include openstack_project::params
class { 'openstack_project::server':
@ -23,6 +24,19 @@ class openstack_project::puppetmaster (
command => 'bash /opt/config/production/run_all.sh',
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
logrotate::file { 'updatepuppetmaster':
ensure => present,
log => '/var/log/puppet_run_all.log',
options => ['compress',
'copytruncate',
'delaycompress',
'missingok',
'rotate 7',
'daily',
'notifempty',
],
require => Cron['updatepuppetmaster'],
}
cron { 'deleteoldreports':
user => 'root',

View File

@ -23,5 +23,7 @@ git fetch -a && git reset -q --hard @{u}
# some times
touch manifests/site.pp
# Put in a logging header
echo "****\n\n$(date)\n\n****" >> /var/log/puppet_run_all.log 2>&1
# Run this as an external script so that the above pull will get new changes
/usr/local/bin/run_remote_puppet
/usr/local/bin/run_remote_puppet >> /var/log/puppet_run_all.log 2>&1