diff options
Diffstat (limited to 'manifests/defines')
-rw-r--r-- | manifests/defines/vhost_files.pp | 3 | ||||
-rw-r--r-- | manifests/defines/vhost_varieties.pp | 65 |
2 files changed, 68 insertions, 0 deletions
diff --git a/manifests/defines/vhost_files.pp b/manifests/defines/vhost_files.pp index b7e1847..844166e 100644 --- a/manifests/defines/vhost_files.pp +++ b/manifests/defines/vhost_files.pp @@ -23,6 +23,7 @@ define apache::vhost( $allow_override = 'None', $php_upload_tmp_dir = 'absent', $php_session_save_path = 'absent', + $cgi_binpath = 'absent', $options = 'absent', $additional_options = 'absent', $template_mode = 'static', @@ -48,6 +49,7 @@ define apache::vhost( domainalias => $domainalias, php_upload_tmp_dir => $php_upload_tmp_dir, php_session_save_path => $php_session_save_path, + cgi_binpath => $cgi_binpath, allow_override => $allow_override, options => $options, additional_options => $additional_options, @@ -162,6 +164,7 @@ define apache::vhost::template( $allow_override = 'None', $php_upload_tmp_dir = 'absent', $php_session_save_path = 'absent', + $cgi_binpath = 'absent', $options = 'absent', $additional_options = 'absent', $template_mode = 'static', diff --git a/manifests/defines/vhost_varieties.pp b/manifests/defines/vhost_varieties.pp index ba104db..b991fce 100644 --- a/manifests/defines/vhost_varieties.pp +++ b/manifests/defines/vhost_varieties.pp @@ -142,3 +142,68 @@ define apache::vhost::php::standard( mod_security => $mod_security, } } + +define apache::vhost::perl( + $domain = 'absent', + $domainalias = 'absent', + $path = 'absent', + $owner = root, + $group = 0, + $documentroot_owner = apache, + $documentroot_group = 0, + $documentroot_mode = 0750, + $allow_override = 'None', + $cgi_binpath = 'absent', + $options = 'absent', + $additional_options = 'absent', + $mod_security = 'true', + $vhost_mode = 'template', + $vhost_source = 'absent', + $vhost_destination = 'absent', + $htpasswd_file = 'absent', + $htpasswd_path = 'absent' +){ + # cgi_bin path + case $cgi_binpath { + 'absent': { + $real_cgi_binpath = "${path}/cgi-bin" } + } + default: { $real_cgi_binpath = $cgi_binpath + } + file{$real_cgi_binpath: + ensure => directory, + owner => $documentroot_owner, + group => $documentroot_group, + mode => $documentroot_mode; + } + + # create webdir + apache::vhost::webdir{$name: + path => $path, + owner => $owner, + group => $group, + documentroot_owner => $documentroot_owner, + documentroot_group => $documentroot_group, + documentroot_mode => $documentroot_mode, + } + + # create vhost configuration file + apache::vhost{$name: + path => $path, + template_mode => 'perl', + vhost_mode => $vhost_mode, + vhost_source => $vhost_source, + vhost_destination => $vhost_destination, + domain => $domain, + domainalias => $domainalias, + allow_override => $allow_override, + options => $options, + additional_options => $additional_options, + cgi_binpath => $real_cgi_binpath, + ssl_mode => $ssl_mode, + htpasswd_file => $htpasswd_file, + htpasswd_path => $htpasswd_path, + mod_security => $mod_security, + } + +} |