diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index d6bc2d96bb..641cbdff24 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -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', diff --git a/run_all.sh b/run_all.sh index 6f35c43359..0d654ac040 100755 --- a/run_all.sh +++ b/run_all.sh @@ -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