1 |
class phpbb::base { |
2 |
$db = 'phpbb' |
3 |
$user = 'phpbb' |
4 |
$forums_dir = '/var/www/forums/' |
5 |
|
6 |
include apache::mod::php |
7 |
|
8 |
package {['php-gd', |
9 |
'php-xml', |
10 |
'php-zlib', |
11 |
'php-ftp', |
12 |
'php-apc', |
13 |
'php-magickwand', |
14 |
'php-pgsql', |
15 |
'php-ldap']: } |
16 |
|
17 |
package { 'perl-DBD-Pg': } |
18 |
|
19 |
file { '/usr/local/bin/phpbb_apply_config.pl': |
20 |
mode => '0755', |
21 |
source => 'puppet:///modules/phpbb/phpbb_apply_config.pl', |
22 |
} |
23 |
|
24 |
$pgsql_password = extlookup('phpbb_pgsql','x') |
25 |
postgresql::remote_user { $user: |
26 |
password => $pgsql_password, |
27 |
} |
28 |
|
29 |
file { $forums_dir: |
30 |
ensure => directory, |
31 |
} |
32 |
|
33 |
# TODO check that everything is locked down |
34 |
apache::vhost::base { "forums.$::domain": |
35 |
content => template('phpbb/forums_vhost.conf'), |
36 |
} |
37 |
|
38 |
apache::vhost::base { "ssl_forums.$::domain": |
39 |
use_ssl => true, |
40 |
vhost => "forums.$::domain", |
41 |
content => template('phpbb/forums_vhost.conf'), |
42 |
} |
43 |
|
44 |
file { '/etc/httpd/conf/vhosts.d/forums.d/': |
45 |
ensure => directory, |
46 |
} |
47 |
} |
48 |
|
49 |
|