Puppet Class: snapshot::cron::wikidatadumps::rdf

Defined in:
modules/snapshot/manifests/cron/wikidatadumps/rdf.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
# File 'modules/snapshot/manifests/cron/wikidatadumps/rdf.pp', line 1

class snapshot::cron::wikidatadumps::rdf(
    $user      = undef,
    $filesonly = false,
) {
    # functions for wikibase rdf dumps, with values specific to wikidata
    file { '/usr/local/bin/wikidatardf_functions.sh':
        mode   => '0755',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/snapshot/cron/wikibase/wikidatardf_functions.sh',
    }

    $scriptpath = '/usr/local/bin/dumpwikibaserdf.sh'
    if !$filesonly {
        cron { 'wikidatardf-dumps':
            ensure      => 'present',
            command     => "${scriptpath} wikidata all ttl nt; ${scriptpath} wikidata truthy nt; ${scriptpath} wikidata lexemes ttl nt",
            environment => 'MAILTO=ops-dumps@wikimedia.org',
            user        => $user,
            minute      => '0',
            hour        => '23',
            weekday     => '1',
            require     => File[$scriptpath],
        }
    }
}