diff options
author | mh <mh@immerda.ch> | 2009-05-17 21:24:38 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-05-17 21:24:38 +0200 |
commit | 79441bf4fe7f6e4ebe708e2926d370cbd78cb396 (patch) | |
tree | 4af645cb713469f9bccc9fbb3aeb9fd746052bdd /manifests/defines/configuration.pp | |
parent | 6593cf6eb205800dbc9389c47dc9b58db6c44497 (diff) |
get rid off case statement
Diffstat (limited to 'manifests/defines/configuration.pp')
-rw-r--r-- | manifests/defines/configuration.pp | 44 |
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: { |