system-config/modules/gerrit/manifests/cron.pp
Monty Taylor 470c3e45fa Fix gerrit database backups
The gerrit database is now remote, or at least we have a hostname
for it, so we should use the backup_remote class. Also, we don't
make the dbbackups files anymore, so stop trying to compress them.

Change-Id: Iddbaaef9b9fd089f074abeeb988f7cd052c80d25
2014-05-02 15:21:40 -07:00

30 lines
761 B
Puppet

# == Class: gerrit::cron
#
class gerrit::cron(
$script_user = 'update',
$script_key_file = '/home/gerrit2/.ssh/id_rsa'
) {
cron { 'expireoldreviews':
user => 'gerrit2',
hour => '6',
minute => '3',
command => "python /usr/local/bin/expire-old-reviews ${script_user} ${script_key_file}",
require => Class['jeepyb'],
}
cron { 'gerrit_repack':
user => 'gerrit2',
weekday => '0',
hour => '4',
minute => '7',
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \;',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
}
cron { 'removedbdumps':
ensure => 'absent',
user => 'gerrit2',
}
}