system-config/modules/openstack_project/manifests/puppet_cron.pp
Monty Taylor db0ea935a1 logdest doesn't seem to work like you'd expect.
Change-Id: Ie73c441ad43b4f30dc5965d8106d242ff2bd3295
Reviewed-on: https://review.openstack.org/11635
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-20 00:24:50 +00:00

21 lines
651 B
Puppet

class openstack_project::puppet_cron($ensure=present) {
include logrotate
class { 'puppetboot':
ensure => $ensure
}
cron { "updatepuppet":
ensure => $ensure,
user => root,
minute => "*/15",
command => 'apt-get update >/dev/null 2>&1 ; sleep $((RANDOM\%600)) && puppet agent --test >>/var/log/manifest.log',
environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin",
}
logrotate::file { 'updatepuppet':
ensure => $ensure,
log => '/var/log/manifest.log',
options => ['compress', 'delaycompress', 'missingok', 'rotate 7', 'daily', 'notifempty'],
require => Cron['updatepuppet'],
}
}