summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMarcel Haerry <haerry@puzzle.ch>2009-05-11 10:45:36 +0200
committerduritong <peter.meier@immerda.ch>2009-05-17 15:46:48 +0200
commit5a75796eab5d016421619c033fcd1474a35e0e67 (patch)
treed09c6301900e9aea15817d0c47894baec59921af /manifests
parentd74a9ae62ef8cf09f2e16e9be7c2ed52eae55484 (diff)
added drupal hosting - changed config file management
It's no possible to not manage config files for webapps.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/vhost_varieties.pp81
1 files changed, 80 insertions, 1 deletions
diff --git a/manifests/defines/vhost_varieties.pp b/manifests/defines/vhost_varieties.pp
index ea34555..019147a 100644
--- a/manifests/defines/vhost_varieties.pp
+++ b/manifests/defines/vhost_varieties.pp
@@ -434,6 +434,84 @@ define apache::vhost::php::simplemachine(
# and run_uid and run_gid are used as vhost users
# run_uid: the uid the vhost should run as with the itk module
# run_gid: the gid the vhost should run as with the itk module
+define apache::vhost::php::drupal(
+ $ensure = present,
+ $domain = 'absent',
+ $domainalias = 'absent',
+ $server_admin = 'absent',
+ $path = 'absent',
+ $owner = root,
+ $group = 0,
+ $documentroot_owner = apache,
+ $documentroot_group = 0,
+ $documentroot_mode = 0750,
+ $run_mode = 'normal',
+ $run_uid = 'absent',
+ $run_gid = 'absent',
+ $allow_override = 'None',
+ $php_upload_tmp_dir = 'absent',
+ $php_session_save_path = 'absent',
+ $do_includes = false,
+ $options = 'absent',
+ $additional_options = 'absent',
+ $default_charset = 'absent',
+ $mod_security = true,
+ $ssl_mode = false,
+ $vhost_mode = 'template',
+ $vhost_source = 'absent',
+ $vhost_destination = 'absent',
+ $htpasswd_file = 'absent',
+ $htpasswd_path = 'absent',
+){
+ $documentroot = $path ? {
+ 'absent' => $operatingsystem ? {
+ openbsd => "/var/www/htdocs/${name}/www",
+ default => "/var/www/vhosts/${name}/www"
+ },
+ default => "${path}/www"
+ }
+
+ # create vhost configuration file
+ apache::vhost::php::webapp{$name:
+ ensure => $ensure,
+ domain => $domain,
+ domainalias => $domainalias,
+ server_admin => $server_admin,
+ path => $path,
+ template_mode => 'php_drupal',
+ owner => $owner,
+ group => $group,
+ documentroot_owner => $documentroot_owner,
+ documentroot_group => $documentroot_group,
+ documentroot_mode => $documentroot_mode,
+ run_mode => $run_mode,
+ run_uid => $run_uid,
+ run_gid => $run_gid,
+ allow_override => $allow_override,
+ php_upload_tmp_dir => $php_upload_tmp_dir,
+ php_session_save_path => $php_session_save_path,
+ do_includes => $do_includes,
+ options => $options,
+ additional_options => $additional_options,
+ default_charset => $default_charset,
+ mod_security => $mod_security,
+ ssl_mode => $ssl_mode,
+ vhost_mode => $vhost_mode,
+ vhost_source => $vhost_source,
+ vhost_destination => $vhost_destination,
+ htpasswd_file => $htpasswd_file,
+ htpasswd_path => $htpasswd_path,
+ manage_directories => false,
+ manage_config => false,
+ }
+}
+
+# run_mode:
+# - normal: nothing special (*default*)
+# - itk: apache is running with the itk module
+# and run_uid and run_gid are used as vhost users
+# run_uid: the uid the vhost should run as with the itk module
+# run_gid: the gid the vhost should run as with the itk module
define apache::vhost::modperl(
$ensure = present,
$domain = 'absent',
@@ -557,7 +635,7 @@ define apache::vhost::php::webapp(
$htpasswd_file = 'absent',
$htpasswd_path = 'absent',
$manage_config = true,
- $config_file,
+ $config_file = 'absent',
$config_webwriteable = false,
$manage_directories = true,
$managed_directories
@@ -571,6 +649,7 @@ define apache::vhost::php::webapp(
}
if $manage_config {
+ if $config_file == 'absent' { fail("No config file defined for ${name} on ${fqdn}, if you'd like to manage the config, you have to add one!") }
apache::vhost::file::documentrootfile{"configurationfile_${name}":
documentroot => $documentroot,
filename => $config_file,