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
@ -3,22 +3,31 @@ class openstack_project::puppetmaster (
|
|||||||
) {
|
) {
|
||||||
class { 'openstack_project::server':
|
class { 'openstack_project::server':
|
||||||
iptables_public_tcp_ports => [8140],
|
iptables_public_tcp_ports => [8140],
|
||||||
sysadmins => $sysadmins
|
sysadmins => $sysadmins
|
||||||
}
|
}
|
||||||
cron { "updatepuppetmaster":
|
|
||||||
user => root,
|
cron { 'updatepuppetmaster':
|
||||||
minute => "*/15",
|
user => 'root',
|
||||||
command => 'sleep $((RANDOM\%600)) && cd /opt/openstack-ci-puppet/production && /usr/bin/git pull -q && /bin/bash install_modules.sh',
|
minute => '*/15',
|
||||||
environment => "PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin",
|
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':
|
file { '/etc/puppet/hiera.yaml':
|
||||||
owner => 'root',
|
ensure => present,
|
||||||
group => 'root',
|
owner => 'root',
|
||||||
mode => 555,
|
group => 'root',
|
||||||
ensure => 'present',
|
mode => '0555',
|
||||||
source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml',
|
source => 'puppet:///modules/openstack_project/puppetmaster/hiera.yaml',
|
||||||
replace => 'true',
|
replace => true,
|
||||||
require => Class['openstack_project::server']
|
require => Class['openstack_project::server']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user