aboutsummaryrefslogtreecommitdiffstats
path: root/modules/phpbb
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-15 15:56:33 +0000
committerMichael Scherer <misc@mageia.org>2012-03-15 15:56:33 +0000
commit92ea9d4103ae86c9b4767ac7f09c0aa43882abcb (patch)
tree725e07d683dda33d61b05182dd61e67b3207a773 /modules/phpbb
parent1ac0e60bf7d1d1db25e0ae4facc98965f2484e31 (diff)
downloadpuppet-92ea9d4103ae86c9b4767ac7f09c0aa43882abcb.tar
puppet-92ea9d4103ae86c9b4767ac7f09c0aa43882abcb.tar.gz
puppet-92ea9d4103ae86c9b4767ac7f09c0aa43882abcb.tar.bz2
puppet-92ea9d4103ae86c9b4767ac7f09c0aa43882abcb.tar.xz
puppet-92ea9d4103ae86c9b4767ac7f09c0aa43882abcb.zip
split and clean phpbb::base
Diffstat (limited to 'modules/phpbb')
-rw-r--r--modules/phpbb/manifests/base.pp49
-rw-r--r--modules/phpbb/manifests/init.pp49
2 files changed, 49 insertions, 49 deletions
diff --git a/modules/phpbb/manifests/base.pp b/modules/phpbb/manifests/base.pp
new file mode 100644
index 00000000..6765fb43
--- /dev/null
+++ b/modules/phpbb/manifests/base.pp
@@ -0,0 +1,49 @@
+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-apc',
+ '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,
+ }
+}
+
+
diff --git a/modules/phpbb/manifests/init.pp b/modules/phpbb/manifests/init.pp
index c170f5c5..5b2115a6 100644
--- a/modules/phpbb/manifests/init.pp
+++ b/modules/phpbb/manifests/init.pp
@@ -1,53 +1,4 @@
class phpbb {
- class base {
- $db = "phpbb"
- $user = "phpbb"
-
- include apache::mod_php
-
- package { ["php-gd",
- "php-xml",
- "php-zlib",
- "php-ftp",
- "php-apc",
- "php-magickwand",
- "php-pgsql",
- "php-ldap", ] : }
-
- package { "perl-DBD-Pg": }
-
- file { "/usr/local/bin/phpbb_apply_config.pl":
- mode => 755,
- source => 'puppet:///modules/phpbb/phpbb_apply_config.pl',
- }
-
- $pgsql_password = extlookup("phpbb_pgsql",'x')
- postgresql::remote_user { $user:
- password => $pgsql_password,
- }
-
- $forums_dir = "/var/www/forums/"
- file { "$forums_dir":
- ensure => directory,
- }
- # TODO add a ssl counterpart
- # 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,
- }
-
- }
-
define phpbb_config($key, $value, $database) {
exec { "phpbb_apply $name":
command => "/usr/local/bin/phpbb_apply_config.pl $key",