memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / glance / manifests / cache / pruner.pp
1 # == Class: glance::cache::pruner
2 #
3 # Installs a cron job to run glance-cache-pruner.
4 #
5 # === Parameters
6 #
7 #  [*minute*]
8 #    (optional) Defaults to '*/30'.
9 #
10 #  [*hour*]
11 #    (optional) Defaults to '*'.
12 #
13 #  [*monthday*]
14 #    (optional) Defaults to '*'.
15 #
16 #  [*month*]
17 #    (optional) Defaults to '*'.
18 #
19 #  [*weekday*]
20 #    (optional) Defaults to '*'.
21 #
22 #  [*command_options*]
23 #    command options to add to the cronjob
24 #    (eg. point to config file, or redirect output)
25 #    (optional) Defaults to ''.
26 #
27 class glance::cache::pruner (
28   $minute           = '*/30',
29   $hour             = '*',
30   $monthday         = '*',
31   $month            = '*',
32   $weekday          = '*',
33   $command_options  = '',
34 ) {
35
36   include glance::params
37
38   cron { 'glance-cache-pruner':
39     command     => "${glance::params::cache_pruner_command} ${command_options}",
40     environment => 'PATH=/bin:/usr/bin:/usr/sbin',
41     user        => 'glance',
42     minute      => $minute,
43     hour        => $hour,
44     monthday    => $monthday,
45     month       => $month,
46     weekday     => $weekday,
47     require     => Package[$::glance::params::api_package_name],
48
49   }
50 }