aboutsummaryrefslogtreecommitdiffstats
path: root/modules/phpbb/manifests/base.pp
blob: 82340c7d47efd9e135b8e6eb4c2ada557440cb25 (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
37
38
39
40
41
42
43
44
45
46
47
48
class phpbb::base {
    $db = 'phpbb'
    $user = 'phpbb'
    $forums_dir = '/var/www/forums/'

    include apache::mod::php

    package {['php-gd',
              'php-xml',
              'php-zlib',
              'php-ftp',
              'php-magickwand',
              'php-pgsql',
              'php-ldap']: }

    package { 'perl-DBD-Pg': }

    file { '/usr/local/bin/phpbb_apply_config.pl':
        mode   => '0755',
        source => 'puppet:///modules/phpbb/phpbb_apply_config.pl',
    }

    $pgsql_password = extlookup('phpbb_pgsql','x')
    postgresql::remote_user { $user:
        password => $pgsql_password,
    }

    file { $forums_dir:
        ensure => directory,
    }

    # TODO check that everything is locked down
    apache::vhost::base { "forums.${::domain}":
        content => template('phpbb/forums_vhost.conf'),
    }

    apache::vhost::base { "ssl_forums.${::domain}":
        use_ssl => true,
        vhost   => "forums.${::domain}",
        content => template('phpbb/forums_vhost.conf'),
    }

    file { '/etc/httpd/conf/vhosts.d/forums.d/':
        ensure => directory,
    }
}