07e7fe02ba
Change-Id: Ib7d4a007da15fa3b20938a5f7b520bacabadad46 Reviewed-on: https://review.openstack.org/12421 Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
34 lines
733 B
Puppet
34 lines
733 B
Puppet
class tmpreaper() {
|
|
package { 'tmpreaper':
|
|
ensure => present,
|
|
}
|
|
|
|
file { '/etc/cron.daily/tmpreaper':
|
|
ensure => absent
|
|
}
|
|
|
|
file { '/usr/local/bin/tmpreaper.sh':
|
|
ensure => 'present',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => 755,
|
|
source => 'puppet:///modules/tmpreaper/tmpreaper.sh',
|
|
}
|
|
|
|
file { '/etc/tmpreaper.conf':
|
|
ensure => 'present',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => 644,
|
|
source => 'puppet:///modules/tmpreaper/tmpreaper.conf',
|
|
}
|
|
|
|
cron { 'tmpreaper':
|
|
user => 'root',
|
|
minute => '42',
|
|
hour => '*/6',
|
|
command => 'sleep $((RANDOM\%60+60)) && /usr/local/bin/tmpreaper.sh',
|
|
require => File['/usr/local/bin/tmpreaper.sh'],
|
|
}
|
|
}
|