Puppet Class: profile::dumps::distribution::datasets::cleanup_miscdatasets

Defined in:
modules/profile/manifests/dumps/distribution/datasets/cleanup_miscdatasets.pp

Overview

Parameters:

  • miscdumpsdir (Any) (defaults to: lookup('profile::dumps::distribution::miscdumpsdir'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'modules/profile/manifests/dumps/distribution/datasets/cleanup_miscdatasets.pp', line 1

class profile::dumps::distribution::datasets::cleanup_miscdatasets(
    $miscdumpsdir = lookup('profile::dumps::distribution::miscdumpsdir'),
) {

    $user = 'dumpsgen'
    $cleanup_slowparse = "find ${miscdumpsdir}/slow-parse -type f -mtime +90 -exec rm {} \\;"

    cron { 'cleanup_miscdatasets':
        ensure      => 'absent',
        environment => 'MAILTO=ops-dumps@wikimedia.org',
        command     => $cleanup_slowparse,
        user        => $user,
        minute      => '45',
        hour        => '1',
    }
}