summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMarcel Haerry <haerry@puzzle.ch>2009-05-26 14:58:25 +0200
committerMarcel Haerry <haerry@puzzle.ch>2009-05-26 14:58:25 +0200
commitb232a1df036ae44237586ae565e25e5b69f1da0c (patch)
treed650681da9e4b0035e42c37aae258042eccded22 /manifests
parent046830e261f9e18d5bfa37fd10e20945e5d1368f (diff)
parent0544dfad7a8f7994c3d6d160b21130ff92fdbd8d (diff)
merged with immerda
Diffstat (limited to 'manifests')
-rw-r--r--manifests/gentoo/module.pp (renamed from manifests/centos/gentoo.pp)0
-rw-r--r--manifests/package/itk.pp1
-rw-r--r--manifests/vhost/php/mediawiki.pp70
-rw-r--r--manifests/vhost/php/standard.pp9
-rw-r--r--manifests/vhost/php/webapp.pp8
-rw-r--r--manifests/vhost/webdir.pp5
6 files changed, 87 insertions, 6 deletions
diff --git a/manifests/centos/gentoo.pp b/manifests/gentoo/module.pp
index 262a25c..262a25c 100644
--- a/manifests/centos/gentoo.pp
+++ b/manifests/gentoo/module.pp
diff --git a/manifests/package/itk.pp b/manifests/package/itk.pp
index 8a103d4..4ca9960 100644
--- a/manifests/package/itk.pp
+++ b/manifests/package/itk.pp
@@ -3,4 +3,3 @@ class apache::package::itk inherits apache::package {
name => 'apache2-itk',
}
}
-
diff --git a/manifests/vhost/php/mediawiki.pp b/manifests/vhost/php/mediawiki.pp
new file mode 100644
index 0000000..2a454d2
--- /dev/null
+++ b/manifests/vhost/php/mediawiki.pp
@@ -0,0 +1,70 @@
+# 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::php::mediawiki(
+ $ensure = present,
+ $domain = 'absent',
+ $domainalias = 'absent',
+ $server_admin = 'absent',
+ $path = 'absent',
+ $manage_docroot = true,
+ $owner = root,
+ $group = 0,
+ $documentroot_owner = apache,
+ $documentroot_group = 0,
+ $documentroot_mode = 0640,
+ $run_mode = 'normal',
+ $run_uid = 'absent',
+ $run_gid = 'absent',
+ $allow_override = 'FileInfo',
+ $php_upload_tmp_dir = 'absent',
+ $php_session_save_path = 'absent',
+ $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'
+){
+ # create vhost configuration file
+ ::apache::vhost::php::webapp{$name:
+ ensure => $ensure,
+ domain => $domain,
+ domainalias => $domainalias,
+ server_admin => $server_admin,
+ path => $path,
+ manage_docroot => $manage_docroot,
+ template_mode => 'php_mediawiki',
+ 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,
+ 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,
+ }
+}
+
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index 4e5873f..fcca6cd 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -10,6 +10,8 @@ define apache::vhost::php::standard(
$domainalias = 'absent',
$server_admin = 'absent',
$path = 'absent',
+ $manage_webdir = true,
+ $manage_docroot = true,
$template_mode = 'php',
$owner = root,
$group = apache,
@@ -46,16 +48,19 @@ define apache::vhost::php::standard(
run_uid => $run_uid,
}
- # create webdir
- ::apache::vhost::webdir{$name:
+ if $manage_webdir {
+ # create webdir
+ ::apache::vhost::webdir{$name:
ensure => $ensure,
path => $path,
owner => $owner,
group => $group,
run_mode => $run_mode,
+ manage_docroot => $manage_docroot,
documentroot_owner => $documentroot_owner,
documentroot_group => $documentroot_group,
documentroot_mode => $documentroot_mode,
+ }
}
# create vhost configuration file
diff --git a/manifests/vhost/php/webapp.pp b/manifests/vhost/php/webapp.pp
index 04fd29c..d628dd8 100644
--- a/manifests/vhost/php/webapp.pp
+++ b/manifests/vhost/php/webapp.pp
@@ -10,6 +10,8 @@ define apache::vhost::php::webapp(
$domainalias = 'absent',
$server_admin = 'absent',
$path = 'absent',
+ $manage_webdir = true,
+ $manage_docroot = true,
$template_mode,
$owner = root,
$group = 0,
@@ -37,10 +39,10 @@ define apache::vhost::php::webapp(
$config_file = 'absent',
$config_webwriteable = false,
$manage_directories = true,
- $managed_directories
+ $managed_directories = 'absent'
){
if ($ensure != 'absent') {
- if $manage_directories {
+ if $manage_directories and ($managed_directories != 'absent') {
::apache::file::rw{ $managed_directories :
owner => $documentroot_owner,
group => $documentroot_group,
@@ -75,6 +77,8 @@ define apache::vhost::php::webapp(
domainalias => $domainalias,
server_admin => $server_admin,
path => $path,
+ manage_webdir => $manage_webdir,
+ manage_docroot => $manage_docroot,
template_mode => $template_mode,
owner => $owner,
group => $group,
diff --git a/manifests/vhost/webdir.pp b/manifests/vhost/webdir.pp
index b3b53f9..5f6a238 100644
--- a/manifests/vhost/webdir.pp
+++ b/manifests/vhost/webdir.pp
@@ -6,6 +6,7 @@ define apache::vhost::webdir(
$group = apache,
$mode = 0640,
$run_mode = 'normal',
+ $manage_docroot = true,
$documentroot_owner = root,
$documentroot_group = apache,
$documentroot_mode = 0640,
@@ -91,10 +92,12 @@ define apache::vhost::webdir(
ensure => directory,
owner => $real_owner, group => $real_group, mode => $real_mode;
}
- file{"$documentroot":
+ if $manage_docroot {
+ file{"$documentroot":
ensure => directory,
recurse => $documentroot_recurse,
owner => $real_documentroot_owner, group => $real_documentroot_group, mode => $documentroot_mode;
+ }
}
file{"$logdir":
ensure => directory,