diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:07:51 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-05-23 15:07:51 +0000 |
commit | b2af3916f62085a298273392088f1c0d931dd49c (patch) | |
tree | 8f6371898343da40f3bbbc32da2f99d771e10b3f /modules | |
parent | 69c91df174a8cbd4e9ce9fac080ee532ea07e871 (diff) | |
download | puppet-b2af3916f62085a298273392088f1c0d931dd49c.tar puppet-b2af3916f62085a298273392088f1c0d931dd49c.tar.gz puppet-b2af3916f62085a298273392088f1c0d931dd49c.tar.bz2 puppet-b2af3916f62085a298273392088f1c0d931dd49c.tar.xz puppet-b2af3916f62085a298273392088f1c0d931dd49c.zip |
buildsystem: add option to select age of cleaned logs
Diffstat (limited to 'modules')
-rw-r--r-- | modules/buildsystem/manifests/scheduler.pp | 10 | ||||
-rw-r--r-- | modules/buildsystem/manifests/var/scheduler.pp | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/modules/buildsystem/manifests/scheduler.pp b/modules/buildsystem/manifests/scheduler.pp index fffe7b63..3b41677f 100644 --- a/modules/buildsystem/manifests/scheduler.pp +++ b/modules/buildsystem/manifests/scheduler.pp @@ -25,9 +25,11 @@ class buildsystem::scheduler { minute => '*', } - tidy { "${buildsystem::var::scheduler::homedir}/uploads": - type => 'ctime', - recurse => true, - age => '2w', + if ($buildsystem::var::scheduler::clean_uploads_logs_age != '0') { + tidy { "${buildsystem::var::scheduler::homedir}/uploads": + type => 'ctime', + recurse => true, + age => $buildsystem::var::scheduler::clean_uploads_logs_age, + } } } diff --git a/modules/buildsystem/manifests/var/scheduler.pp b/modules/buildsystem/manifests/var/scheduler.pp index 02320587..a30e4f71 100644 --- a/modules/buildsystem/manifests/var/scheduler.pp +++ b/modules/buildsystem/manifests/var/scheduler.pp @@ -9,12 +9,18 @@ # a hash containing build nodes indexed by their alias # $build_src_node: # hostname of the server building the initial src.rpm +# $clean_uploads_logs_age: +# old logs are cleaned when they are older than some amount of time. +# You can define this amount of time using this variable. Set it to +# '2w' for two weeks, '2d' for two days, or '0' if you don't want to +# clean old logs at all class buildsystem::var::scheduler( $admin_mail = "root@${::domain}", $pkg_uphost = "pkgsubmit.${::domain}", $build_nodes, $build_nodes_aliases = {}, - $build_src_node + $build_src_node, + $clean_uploads_logs_age = '2w' ){ $login = 'schedbot' $homedir = "/var/lib/$login" |