Puppet Class: role::parsoid

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

Overview

Class: role::parsoid

Configures Parsoid/PHP, a wikitext parsing service.



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
# File 'puppet/modules/role/manifests/parsoid.pp', line 3

class role::parsoid {
    include ::mediawiki

    $parsoid_dir = "${::mediawiki::dir}/vendor/wikimedia/parsoid";

    # register the PHP Virtual REST Service connector
    mediawiki::settings { 'parsoid-vrs':
        values   => template('role/parsoid/vrs.php.erb'),
        priority => 4,
    }

    mediawiki::settings { 'parsoid-extension':
        values => "wfLoadExtension( 'Parsoid', '${parsoid_dir}/extension.json' );",
    }

    # Make the Parsoid directory into a proper checkout for developer convenience
    php::composer::prefer_source { 'parsoid':
        app_dir    => $::mediawiki::dir,
        library    => 'wikimedia/parsoid',
        git_remote => 'https://gerrit.wikimedia.org/r/mediawiki/services/parsoid',
    }

    mediawiki::import::text { 'VagrantRoleParsoid':
        content => template('role/parsoid/VagrantRoleParsoid.wiki.erb'),
    }
}