From 5405cc4f4dfdd27316ab11c9282934acbcd8cfef Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Fri, 16 Mar 2012 16:14:51 -0700 Subject: [PATCH] Adds tmpreaper to jenkins slave crontab. Schedules tmpreaper to run daily at 1am, and delete files older than 1 days from /tmp. Fixes bug 925774 Change-Id: Iff9383d020fa3ea0cbbe85d4ea0e5fe27ba6901e --- modules/jenkins_slave/manifests/init.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/jenkins_slave/manifests/init.pp b/modules/jenkins_slave/manifests/init.pp index 9ad26b3e56..03c228c2e4 100644 --- a/modules/jenkins_slave/manifests/init.pp +++ b/modules/jenkins_slave/manifests/init.pp @@ -65,6 +65,7 @@ class jenkins_slave { "socat", "sqlite3", "swig", + "tmpreaper", "unzip", "vlan", "wget"] @@ -103,4 +104,12 @@ class jenkins_slave { ], } + cron { "tmpreaper": + user => jenkins, + minute => '0', + hour => '1', + command => '/usr/sbin/tmpreaper --runtime 1200 --delay 600 1d /tmp', + require => [ Package[tmpreaper], Jenkinsuser[jenkins] ], + } + }