e344a65fdb
Change-Id: I957e2d4a70048f2eae6e7bffd75ee0796a32d508 Reviewed-on: https://review.openstack.org/14169 Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
34 lines
739 B
Puppet
34 lines
739 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 => '0755',
|
|
source => 'puppet:///modules/tmpreaper/tmpreaper.sh',
|
|
}
|
|
|
|
file { '/etc/tmpreaper.conf':
|
|
ensure => 'present',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
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'],
|
|
}
|
|
}
|