aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/wikis/manifests/init.pp
blob: 6adbe6d06055bac43d8e471768ce1df666597280 (plain)
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
class wikis {
    $wikis_root = '/srv/wiki'
    $wikis_templates = '/srv/wiki-templates'
    class { 'mediawiki::config':
        pgsql_password => extlookup('mediawiki_pgsql','x'),
        secretkey      => extlookup('mediawiki_secretkey','x'),
        ldap_password  => extlookup('mediawiki_ldap','x'),
        root           => $wikis_root,
        vhost          => false,
    }

    git::snapshot { $wikis_templates:
        source => "git://git.$::domain/web/templates/mediawiki"
    }

    $wiki_languages = [ 'en','de', 'fr' ]
    mediawiki::instance { $wiki_languages:
        title         => 'Mageia wiki',
        wiki_settings => template('wikis/wiki_settings'),
        skinsdir      => "$wikis_templates/skins",
    }

    apache::vhost::redirect_ssl { "wiki.$::domain": }

    apache::vhost::base { "ssl_wiki.$::domain":
        use_ssl => true,
        vhost   => "wiki.$::domain",
        content => template('wikis/wiki_vhost.conf'),
    }
}