ansible-roles/jenkins/slave/templates/tmp-cleaner.j2

9 lines
169 B
Django/Jinja

#!/bin/bash
RETAIN_DAYS={{ jenkins_tmp_retain_days }}
LOG_FILE=/var/log/tmp-cleaner.log
find /tmp/ -ctime +${RETAIN_DAYS} -exec rm -fr {} \; >>$LOG_FILE 2>&1
exit 0