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:
parent
5f4c7fa768
commit
09e35c233b
@ -1,12 +1,18 @@
|
|||||||
import "openstack"
|
import "openstack"
|
||||||
|
|
||||||
class openstack_cron {
|
class openstack_cron {
|
||||||
|
include logrotate
|
||||||
cron { "updatepuppet":
|
cron { "updatepuppet":
|
||||||
user => root,
|
user => root,
|
||||||
minute => "*/15",
|
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",
|
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 {
|
class openstack_jenkins_slave {
|
||||||
|
Loading…
Reference in New Issue
Block a user