Merge "Rotate puppet cron job log file."
This commit is contained in:
commit
dd2c31b263
@ -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…
x
Reference in New Issue
Block a user