summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-05-17 21:24:38 +0200
committermh <mh@immerda.ch>2009-05-17 21:24:38 +0200
commit79441bf4fe7f6e4ebe708e2926d370cbd78cb396 (patch)
tree4af645cb713469f9bccc9fbb3aeb9fd746052bdd /manifests
parent6593cf6eb205800dbc9389c47dc9b58db6c44497 (diff)
get rid off case statement
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/configuration.pp44
1 files changed, 20 insertions, 24 deletions
diff --git a/manifests/defines/configuration.pp b/manifests/defines/configuration.pp
index f3ae200..a987157 100644
--- a/manifests/defines/configuration.pp
+++ b/manifests/defines/configuration.pp
@@ -91,33 +91,29 @@ define apache::vhost::webdir(
$documentroot = "${real_path}/www"
$logdir = "${real_path}/logs"
- case $documentroot_owner {
- apache: {
- case $apache_default_user {
- '': {
- $real_documentroot_owner = $operatingsystem ? {
- openbsd => 'www',
- default => $documentroot_owner
- }
- }
- default: { $real_documentroot_owner = $apache_default_user }
- }
+ if $documentroot_owner == 'apache' {
+ if $apache_default_user == '' {
+ $real_documentroot_owner = $operatingsystem ? {
+ openbsd => 'www',
+ default => $documentroot_owner
}
- default: { $real_documentroot_owner = $documentroot_owner }
+ } else {
+ $real_documentroot_owner = $apache_default_user
+ }
+ } else {
+ $real_documentroot_owner = $documentroot_owner
}
- case $apache_group {
- apache: {
- case $apache_default_group {
- '': {
- $real_documentroot_group = $operatingsystem ? {
- openbsd => 'www',
- default => $documentroot_group
- }
- }
- default: { $real_documentroot_group = $apache_default_group }
- }
+ if $documentroot_group == 'apache' {
+ if $apache_default_group == '' {
+ $real_documentroot_group = $operatingsystem ? {
+ openbsd => 'www',
+ default => $documentroot_group
}
- default: { $real_documentroot_group = $documentroot_group }
+ } else {
+ $real_documentroot_group = $apache_default_group
+ }
+ } else {
+ $real_documentroot_group = $documentroot_group
}
case $ensure {
absent: {