aboutsummaryrefslogtreecommitdiffstats
path: root/modules/phpbb/manifests/base.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/phpbb/manifests/base.pp')
-rw-r--r--modules/phpbb/manifests/base.pp57
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/phpbb/manifests/base.pp b/modules/phpbb/manifests/base.pp
new file mode 100644
index 00000000..9f676cb4
--- /dev/null
+++ b/modules/phpbb/manifests/base.pp
@@ -0,0 +1,57 @@
+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,
+ }
+
+ $robotsfile = "$forums_dir/robots.txt"
+ file { $robotsfile:
+ ensure => present,
+ mode => '0644',
+ owner => root,
+ group => root,
+ source => 'puppet:///modules/phpbb/robots.txt',
+ }
+
+ # 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,
+ }
+}
+
+