summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-01-10 16:35:05 +0100
committermh <mh@immerda.ch>2010-01-10 16:35:05 +0100
commit806cc80ff9d2a6b17e40bd7d11281c9d4c78d0d7 (patch)
tree06f8137ad9c6b737c981f2e8c930034d2e2d8370
parentc576e418a6c432c4bde62aeead376a6a561149a3 (diff)
make it also possible that safe_mode_exec_bin can be absent
-rw-r--r--manifests/vhost/php/safe_mode_bin.pp14
-rw-r--r--manifests/vhost/php/standard.pp6
2 files changed, 14 insertions, 6 deletions
diff --git a/manifests/vhost/php/safe_mode_bin.pp b/manifests/vhost/php/safe_mode_bin.pp
index aad4a29..e04557c 100644
--- a/manifests/vhost/php/safe_mode_bin.pp
+++ b/manifests/vhost/php/safe_mode_bin.pp
@@ -5,12 +5,16 @@
# 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::safe_mode_bin(
- $path
+ $ensure = 'present',
+ $path
){
- $substr=regsubst($name,'^.*\/','','G')
- $real_path = "$path/$substr"
- link{ "$real_path":
- target => regsubst($name,'^.*_','')
+ $substr=regsubst($name,'^.*\/','','G')
+ $real_path = "$path/$substr"
+ file{$real_path:
+ ensure => $ensure ? {
+ 'present' => regsubst($name,'^.*_',''),
+ default => absent,
}
+ }
}
diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp
index a7d1276..687696c 100644
--- a/manifests/vhost/php/standard.pp
+++ b/manifests/vhost/php/standard.pp
@@ -82,12 +82,16 @@ define apache::vhost::php::standard(
}
if $php_safe_mode_exec_bins != 'absent' {
File[$php_safe_mode_exec_bin_dir]{
- ensure => directory,
+ ensure => $ensure ? {
+ 'present' => directory,
+ default => absent,
+ },
source => "puppet://$server/modules/common/empty",
owner => $documentroot_owner, group => $documentroot_group, mode => 0750,
}
$php_safe_mode_exec_bins_subst = regsubst($php_safe_mode_exec_bins,"(.+)","${name}_\\1")
apache::vhost::php::safe_mode_bin{ $php_safe_mode_exec_bins_subst:
+ ensure => $ensure,
path => $php_safe_mode_exec_bin_dir
}
}else{