Puppet Class: dumps::web::dirs

Defined in:
modules/dumps/manifests/web/dirs.pp

Overview

Parameters:

  • datadir (Any) (defaults to: undef)
  • xmldumpsdir (Any) (defaults to: undef)
  • miscdatasetsdir (Any) (defaults to: undef)
  • user (Any) (defaults to: undef)
  • group (Any) (defaults to: undef)


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
35
36
37
38
39
40
41
42
43
44
# File 'modules/dumps/manifests/web/dirs.pp', line 1

class dumps::web::dirs(
    $datadir = undef,
    $xmldumpsdir = undef,
    $miscdatasetsdir = undef,
    $user = undef,
    $group = undef,
) {
    class {'dumps::server_dirs':
        datadir         => $datadir,
        xmldumpsdir     => $xmldumpsdir,
        miscdatasetsdir => $miscdatasetsdir,
        user            => $user,
        group           => $group,
    }

    $analyticsdir             = "${miscdatasetsdir}/analytics"
    $othertestfilesdir        = "${miscdatasetsdir}/testfiles"
    $miscdatasetsdir_wikidata_legacy = "${miscdatasetsdir}/wikidata"
    $miscdatasetsdir_wikibase        = "${miscdatasetsdir}/wikibase/"
    $relative_wikidatawiki    = 'other/wikibase/wikidatawiki'

    # subdirs for misc datasets that aren't dumps
    file { [ $analyticsdir, $othertestfilesdir ]:
        ensure => 'directory',
        mode   => '0755',
        owner  => $user,
        group  => $group,
    }

    # subdirs for wikidata/wikibase weekly dumps
    file { [ $miscdatasetsdir_wikibase, "${xmldumpsdir}/${relative_wikidatawiki}",
        $miscdatasetsdir_wikidata_legacy ]:

        ensure => 'directory',
        mode   => '0755',
        owner  => $user,
        group  => $group,
    }
    # T72385: needs to be relative because it is mounted via NFS at differing names
    file { "${xmldumpsdir}/wikidatawiki/entities":
        ensure => 'link',
        target => "../${relative_wikidatawiki}",
    }
}