system-config/modules/tmpreaper/manifests/init.pp
James E. Blair 07e7fe02ba Fix syntax error in tmpreaper sleep.
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
2012-09-05 14:54:59 +00:00

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'],
}
}