Puppet Class: role::mediainfo

Defined in:
puppet/modules/role/manifests/mediainfo.pp

Overview

Class: role::mediainfo

This role sets up a Wikibase repo with the WikibaseMediaInfo extension enabled.

THIS IS A PROTOTYPE!

Parameters:

  • central_repo_domain (Any)


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 'puppet/modules/role/manifests/mediainfo.pp', line 7

class role::mediainfo (
    $central_repo_domain,
) {
    include ::role::wikibase_repo
    include ::role::wikibasecirrussearch
    include ::role::uls

    mediawiki::extension { 'WikibaseMediaInfo':
        wiki         => 'devwiki',
        composer     => true,
        needs_update => true,
        settings     => template('role/mediainfo/settings.php.erb'),
    }

    # This is probably not the right way to create Wikibase entities...
    ['P1', 'P2'].each |String $id| {
        mediawiki::import::text { "Property:${id}":
            wiki    => 'wikidata',
            db_name => 'wikidatawiki',
            content => template("role/mediainfo/${id}.json.erb"),
        }
    }
    ['Q1', 'Q2', 'Q3', 'Q4'].each |String $id| {
        mediawiki::import::text { $id:
            wiki    => 'wikidata',
            db_name => 'wikidatawiki',
            content => template("role/mediainfo/${id}.json.erb"),
        }
    }

    mediawiki::settings { 'WikibaseMediaInfo-UploadWizard':
        priority => $::load_later,
        values   => [
            '$wgUploadWizardConfig["wikibase"]["enabled"] = true;',
            '$wgUploadWizardConfig["wikibase"]["statements"] = true;',
        ],
    }
}