e67f7ef122
The puppet master had its disk fill up with puppet reports. Add a cron job to the puppet master to delete puppet reports that are more than one week old. This should prevent the disk from filling up again for this reason. Change-Id: I0a937e6121285573eb9fbb93eb70bdffa481352d Reviewed-on: https://review.openstack.org/14013 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
34 lines
1.1 KiB
Puppet
34 lines
1.1 KiB
Puppet
class openstack_project::puppetmaster (
|
|
$sysadmins = []
|
|
) {
|
|
class { 'openstack_project::server':
|
|
iptables_public_tcp_ports => [8140],
|
|
sysadmins => $sysadmins
|
|
}
|
|
|
|
cron { 'updatepuppetmaster':
|
|
user => 'root',
|
|
minute => '*/15',
|
|
command => 'sleep $((RANDOM\%600)) && cd /opt/openstack-ci-puppet/production && /usr/bin/git pull -q && /bin/bash install_modules.sh',
|
|
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
|
}
|
|
|
|
cron { 'deleteoldreports':
|
|
user => 'root',
|
|
hour => '3',
|
|
minute => '0',
|
|
command => 'sleep $((RANDOM\%600)) && find /var/lib/puppet/reports -name \'*.yaml\' -mtime +7 -execdir rm {} \;',
|
|
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
|
}
|
|
|
|
file { '/etc/puppet/hiera.yaml':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0555',
|
|
source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml',
|
|
replace => true,
|
|
require => Class['openstack_project::server']
|
|
}
|
|
}
|