Puppet Class: snapshot::systemdjobs::cirrussearch

Defined in:
modules/snapshot/manifests/systemdjobs/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
34
# File 'modules/snapshot/manifests/systemdjobs/cirrussearch.pp', line 1

class snapshot::systemdjobs::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/systemdjobs/dumpcirrussearch.sh',
    }

    if !$filesonly {
        systemd::timer::job { 'cirrussearch-dump':
            ensure             => present,
            description        => 'Regular jobs to build snapshot of cirrus search',
            user               => $user,
            monitoring_enabled => false,
            send_mail          => true,
            environment        => {'MAILTO' => 'ops-dumps@wikimedia.org'},
            command            => "${scriptpath} --config ${confsdir}/wikidump.conf.other",
            interval           => {'start' => 'OnCalendar', 'interval' => 'Mon *-*-* 16:15:0'},
            require            => [ File[$scriptpath], Class['snapshot::dumps::dirs'] ],
        }
    }
}