9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'modules/graphite/manifests/whisper_cleanup.pp', line 9
define graphite::whisper_cleanup (
$directory,
$keep_days = 30,
$user = '_graphite',
) {
$hour = fqdn_rand(24, $title)
$minute = fqdn_rand(60, $title)
systemd::timer::job { $title:
ensure => present,
description => 'Regular jobs for cleanup of whisper directories',
user => $user,
command => "/usr/local/bin/whisper-cleanup ${directory} ${keep_days}",
interval => {'start' => 'OnCalendar', 'interval' => "*-*-* ${hour}:${minute}:00"},
require => [
File['/usr/local/bin/whisper-cleanup']
],
}
}
|