system-config/modules/openstack_project/manifests/puppet_cron.pp
Matthew Wagoner f31a426c65 Cleanup openstack_project manifest lint errors.
Now with extra unwrap!

Change-Id: I7c622ffa77821f33f911793fc6b6cdaaba37904a
Reviewed-on: https://review.openstack.org/15052
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2012-11-21 17:48:11 +00:00

30 lines
763 B
Puppet

# == Class: openstack_project::puppet_cron
#
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'],
}
}