X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fglance%2Fmanifests%2Fcache%2Fcleaner.pp;fp=3rdparty%2Fmodules%2Fglance%2Fmanifests%2Fcache%2Fcleaner.pp;h=f05258db2427567d19aca819358b31041cb04db4;hp=0000000000000000000000000000000000000000;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa diff --git a/3rdparty/modules/glance/manifests/cache/cleaner.pp b/3rdparty/modules/glance/manifests/cache/cleaner.pp new file mode 100644 index 00000000..f05258db --- /dev/null +++ b/3rdparty/modules/glance/manifests/cache/cleaner.pp @@ -0,0 +1,49 @@ +# == Class: glance::cache::cleaner +# +# Installs a cron job to run glance-cache-cleaner. +# +# === Parameters +# +# [*minute*] +# (optional) Defaults to '1'. +# +# [*hour*] +# (optional) Defaults to '0'. +# +# [*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 ''. +# +class glance::cache::cleaner ( + $minute = 1, + $hour = 0, + $monthday = '*', + $month = '*', + $weekday = '*', + $command_options = '', +) { + + include glance::params + + cron { 'glance-cache-cleaner': + command => "${glance::params::cache_cleaner_command} ${command_options}", + environment => 'PATH=/bin:/usr/bin:/usr/sbin', + user => 'glance', + minute => $minute, + hour => $hour, + monthday => $monthday, + month => $month, + weekday => $weekday, + require => Package[$::glance::params::api_package_name], + } +}