diff options
Diffstat (limited to 'manifests/defines')
-rw-r--r-- | manifests/defines/vhost_files.pp | 19 | ||||
-rw-r--r-- | manifests/defines/vhost_varieties.pp | 12 |
2 files changed, 31 insertions, 0 deletions
diff --git a/manifests/defines/vhost_files.pp b/manifests/defines/vhost_files.pp index 844166e..207c4fa 100644 --- a/manifests/defines/vhost_files.pp +++ b/manifests/defines/vhost_files.pp @@ -26,6 +26,9 @@ define apache::vhost( $cgi_binpath = 'absent', $options = 'absent', $additional_options = 'absent', + $run_mode = 'normal', + $run_uid = 'absent', + $run_gid = 'absent', $template_mode = 'static', $ssl_mode = 'false', $htpasswd_file = 'absent', @@ -53,6 +56,9 @@ define apache::vhost( allow_override => $allow_override, options => $options, additional_options => $additional_options, + run_mode => $run_mode, + run_uid => $run_uid, + run_gid => $run_gid, template_mode => $template_mode, ssl_mode => $ssl_mode, htpasswd_file => $htpasswd_file, @@ -167,6 +173,9 @@ define apache::vhost::template( $cgi_binpath = 'absent', $options = 'absent', $additional_options = 'absent', + $run_mode = 'normal', + $run_uid = 'absent', + $run_gid = 'absent', $template_mode = 'static', $ssl_mode = 'false', $mod_security = 'true', @@ -204,6 +213,16 @@ define apache::vhost::template( } default: { $real_htpasswd_path = $htpasswd_path } } + case $run_mode { + 'itk': { + case $run_uid { + 'absent': { fail("you have to define run_uid for $name on $fqdn") } + } + case $run_gid { + 'absent': { fail("you have to define run_gid for $name on $fqdn") } + } + } + } apache::vhost::file{$name: content => template("apache/vhosts/$template_mode/$operatingsystem.erb"), htpasswd_file => $htpasswd_file, diff --git a/manifests/defines/vhost_varieties.pp b/manifests/defines/vhost_varieties.pp index 3f3121c..2b5cd44 100644 --- a/manifests/defines/vhost_varieties.pp +++ b/manifests/defines/vhost_varieties.pp @@ -143,6 +143,12 @@ define apache::vhost::php::standard( } } +# 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::perl( $domain = 'absent', $domainalias = 'absent', @@ -152,6 +158,9 @@ define apache::vhost::perl( $documentroot_owner = apache, $documentroot_group = 0, $documentroot_mode = 0750, + $run_mode = 'normal', + $run_uid = 'absent', + $run_gid = 'absent', $allow_override = 'None', $cgi_binpath = 'absent', $options = 'absent', @@ -194,6 +203,9 @@ define apache::vhost::perl( vhost_destination => $vhost_destination, domain => $domain, domainalias => $domainalias, + run_mode => $run_mode, + run_uid => $run_uid, + run_gid => $run_gid, allow_override => $allow_override, options => $options, additional_options => $additional_options, |