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:
parent
ba4f813ebb
commit
21ab83c0b5
@ -5,6 +5,7 @@ class openstack_project::puppetmaster (
|
|||||||
$override_list = [],
|
$override_list = [],
|
||||||
$sysadmins = []
|
$sysadmins = []
|
||||||
) {
|
) {
|
||||||
|
include logrotate
|
||||||
include openstack_project::params
|
include openstack_project::params
|
||||||
|
|
||||||
class { 'openstack_project::server':
|
class { 'openstack_project::server':
|
||||||
@ -23,6 +24,19 @@ class openstack_project::puppetmaster (
|
|||||||
command => 'bash /opt/config/production/run_all.sh',
|
command => 'bash /opt/config/production/run_all.sh',
|
||||||
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
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':
|
cron { 'deleteoldreports':
|
||||||
user => 'root',
|
user => 'root',
|
||||||
|
@ -23,5 +23,7 @@ git fetch -a && git reset -q --hard @{u}
|
|||||||
# some times
|
# some times
|
||||||
touch manifests/site.pp
|
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
|
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user