Rotate puppet cron job log file.

Fixes bug 966314.

Moves the puppet cron job log file from /tmp to /var/log
and adds it to logrotate.

Change-Id: Id3e218a3a2bf97c5e1f07cb40c39b5a795164888
This commit is contained in:
David Shrewsbury 2012-05-07 17:04:40 -04:00
parent 5f4c7fa768
commit 09e35c233b

View File

@ -1,12 +1,18 @@
import "openstack"
class openstack_cron {
include logrotate
cron { "updatepuppet":
user => root,
minute => "*/15",
command => 'apt-get update >/dev/null 2>&1 ; sleep $((RANDOM\%600)) && cd /root/openstack-ci-puppet && /usr/bin/git pull -q && puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/site.pp',
command => 'apt-get update >/dev/null 2>&1 ; sleep $((RANDOM\%600)) && cd /root/openstack-ci-puppet && /usr/bin/git pull -q && puppet apply -l /var/log/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/site.pp',
environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin",
}
logrotate::file { 'updatepuppet':
log => '/var/log/manifest.log',
options => ['compress', 'delaycompress', 'missingok', 'rotate 7', 'daily', 'notifempty'],
require => Cron['updatepuppet'],
}
}
class openstack_jenkins_slave {