Puppet Class: snapshot::cron::cirrussearch

Defined in:
modules/snapshot/manifests/cron/cirrussearch.pp

Overview

Parameters:

  • user (Any) (defaults to: undef)
  • filesonly (Any) (defaults to: false)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'modules/snapshot/manifests/cron/cirrussearch.pp', line 1

class snapshot::cron::cirrussearch(
    $user      = undef,
    $filesonly = false,
) {
    $confsdir = $snapshot::dumps::dirs::confsdir

    file { '/var/log/cirrusdump':
        ensure => 'directory',
        mode   => '0644',
        owner  => $user,
    }

    $scriptpath = '/usr/local/bin/dumpcirrussearch.sh'
    file { $scriptpath:
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/snapshot/cron/dumpcirrussearch.sh',
    }

    if !$filesonly {
        cron { 'cirrussearch-dump':
            ensure      => 'present',
            command     => "${scriptpath} --config ${confsdir}/wikidump.conf.other",
            environment => 'MAILTO=ops-dumps@wikimedia.org',
            user        => $user,
            minute      => '15',
            hour        => '16',
            weekday     => '1',
            require     => [ File[$scriptpath], Class['snapshot::dumps::dirs'] ],
        }
    }
}