summaryrefslogtreecommitdiff
path: root/manifests/vhost/phpdirs.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
committerMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
commit0e7099174fdef951c81880b51e23342fcde86374 (patch)
tree28e99fd804674e3ac025a73a061c73f0ce6d7870 /manifests/vhost/phpdirs.pp
parent3ac4d6249f50627c0827ce3812eb21d5b89ed974 (diff)
parentbf36ba5e988a7bb3f163ed0575020ef714519edc (diff)
Merge remote-tracking branch 'shared/master' into riseup
Conflicts: README
Diffstat (limited to 'manifests/vhost/phpdirs.pp')
-rw-r--r--manifests/vhost/phpdirs.pp76
1 files changed, 33 insertions, 43 deletions
diff --git a/manifests/vhost/phpdirs.pp b/manifests/vhost/phpdirs.pp
index 24413d0..5936da6 100644
--- a/manifests/vhost/phpdirs.pp
+++ b/manifests/vhost/phpdirs.pp
@@ -1,49 +1,39 @@
define apache::vhost::phpdirs(
- $ensure = present,
- $php_upload_tmp_dir = 'absent',
- $php_session_save_path = 'absent',
- $documentroot_owner = apache,
- $documentroot_group = 0,
- $documentroot_mode = 0750,
- $run_mode = 'normal',
- $run_uid = 'absent'
+ $ensure = present,
+ $php_upload_tmp_dir,
+ $php_session_save_path,
+ $documentroot_owner = apache,
+ $documentroot_group = 0,
+ $documentroot_mode = 0750,
+ $run_mode = 'normal',
+ $run_uid = 'absent'
){
- # php upload_tmp_dir
- case $php_upload_tmp_dir {
- 'absent': {
- include apache::defaultphpdirs
- $real_php_upload_tmp_dir = "/var/www/upload_tmp_dir/$name"
- }
- default: { $real_php_upload_tmp_dir = $php_upload_tmp_dir }
+ case $ensure {
+ absent : {
+ file {
+ [$php_upload_tmp_dir, $php_session_save_path] :
+ ensure => absent,
+ purge => true,
+ force => true,
+ recurse => true,
+ }
}
- # php session_save_path
- case $php_session_save_path {
- 'absent': {
- include apache::defaultphpdirs
- $real_php_session_save_path = "/var/www/session.save_path/$name"
- }
- default: { $real_php_session_save_path = $php_session_save_path }
- }
-
- case $ensure {
- absent: {
- file{[$real_php_upload_tmp_dir, $real_php_session_save_path ]:
- ensure => absent,
- purge => true,
- force => true,
- recurse => true,
- }
- }
- default: {
- file{[$real_php_upload_tmp_dir, $real_php_session_save_path ]:
- ensure => directory,
- owner => $run_mode ? {
- 'itk' => $run_uid,
- default => $documentroot_owner
- },
- group => $documentroot_group, mode => $documentroot_mode;
- }
- }
+ default : {
+ include apache::defaultphpdirs
+ file {
+ [$php_upload_tmp_dir, $php_session_save_path] :
+ ensure => directory,
+ owner => $run_mode ? {
+ 'itk' => $run_uid,
+ 'static-itk' => $run_uid,
+ 'proxy-itk' => $run_uid,
+ 'fcgid' => $run_uid,
+ default => $documentroot_owner
+ },
+ group => $documentroot_group,
+ mode => $documentroot_mode ;
+ }
}
+ }
}