Puppet Class: glance::cache::pruner

Defined in:
manifests/cache/pruner.pp

Overview

Class: glance::cache::pruner

Installs a cron job to run glance-cache-pruner.

Parameters

[*minute*]
  (optional) Defaults to '*/30'.

[*hour*]
  (optional) Defaults to '*'.

[*monthday*]
  (optional) Defaults to '*'.

[*month*]
  (optional) Defaults to '*'.

[*weekday*]
  (optional) Defaults to '*'.

[*command_options*]
  command options to add to the cronjob
  (eg. point to config file, or redirect output)
  (optional) Defaults to ''.

Parameters:

  • minute (Any) (defaults to: '*/30')
  • hour (Any) (defaults to: '*')
  • monthday (Any) (defaults to: '*')
  • month (Any) (defaults to: '*')
  • weekday (Any) (defaults to: '*')
  • command_options (Any) (defaults to: '')


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'manifests/cache/pruner.pp', line 27

class glance::cache::pruner(
  $minute           = '*/30',
  $hour             = '*',
  $monthday         = '*',
  $month            = '*',
  $weekday          = '*',
  $command_options  = '',
) {

  include glance::deps
  include glance::params

  cron { 'glance-cache-pruner':
    command     => "${glance::params::cache_pruner_command} ${command_options}",
    environment => 'PATH=/bin:/usr/bin:/usr/sbin',
    user        => $::glance::params::user,
    minute      => $minute,
    hour        => $hour,
    monthday    => $monthday,
    month       => $month,
    weekday     => $weekday,
    require     => Anchor['glance::config::end'],

  }
}