Delete puppet reports more than one week old.
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
This commit is contained in:
parent
a4f1a267ac
commit
e67f7ef122
@ -5,20 +5,29 @@ class openstack_project::puppetmaster (
|
||||
iptables_public_tcp_ports => [8140],
|
||||
sysadmins => $sysadmins
|
||||
}
|
||||
cron { "updatepuppetmaster":
|
||||
user => root,
|
||||
minute => "*/15",
|
||||
|
||||
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",
|
||||
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 => 555,
|
||||
ensure => 'present',
|
||||
mode => '0555',
|
||||
source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml',
|
||||
replace => 'true',
|
||||
replace => true,
|
||||
require => Class['openstack_project::server']
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user