diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/vhost/php/safe_mode_bin.pp | 14 | ||||
-rw-r--r-- | manifests/vhost/php/standard.pp | 6 |
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{ |