aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mediawiki/manifests/base.pp
blob: 52600ac1cf56523f023e973078a358a8c1904017 (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
31
32
33
34
35
36
class mediawiki::base {
    include apache::mod::php
    $vhost = $mediawiki::config::vhost
    $root = $mediawiki::config::root

    package { ['mediawiki-minimal','mediawiki-ldapauthentication']: }

    file { $mediawiki::config::root:
        ensure => directory,
    }

    file { '/usr/local/bin/init_wiki.php':
        mode   => '0755',
        source => 'puppet:///modules/mediawiki/init_wiki.php',
    }

    $user = 'mediawiki'

    postgresql::remote_user { $user:
        password => $mediawiki::config::pgsql_password,
    }

    # TODO create the ldap user

    if $vhost {
        apache::vhost::redirect_ssl { $vhost: }

        apache::vhost::base { "ssl_$vhost":
            location => $root,
            use_ssl  => true,
            vhost    => $vhost,
            content  => template('mediawiki/wiki_vhost.conf'),
        }
    }
    # add index.php
}