summaryrefslogtreecommitdiff
path: root/manifests/htpasswd_user.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-05-31 11:38:45 +0200
committermh <mh@immerda.ch>2012-05-31 11:38:45 +0200
commit076909377eaa3aa41936e3acb7e02a9b5b14d493 (patch)
treedae4bd4d405ffe1ba75ea1d50763bfbecf9e1a19 /manifests/htpasswd_user.pp
parent4ff385d82bc0d300d501bf1fb41df8602c7c95a6 (diff)
fix various puppet language things
Diffstat (limited to 'manifests/htpasswd_user.pp')
-rw-r--r--manifests/htpasswd_user.pp9
1 files changed, 4 insertions, 5 deletions
diff --git a/manifests/htpasswd_user.pp b/manifests/htpasswd_user.pp
index 9fcea0a..c4c5453 100644
--- a/manifests/htpasswd_user.pp
+++ b/manifests/htpasswd_user.pp
@@ -16,10 +16,6 @@ define apache::htpasswd_user(
'absent': { $real_site = $name }
default: { $real_site = $site }
}
- case $path {
- 'absent': { $real_path = "/var/www/htpasswds/${real_site}" }
- default: { $real_path = $path }
- }
if $password_iscrypted {
$real_password = $password
} else {
@@ -28,7 +24,10 @@ define apache::htpasswd_user(
file_line{"htpasswd_for_${real_site}":
ensure => $ensure,
- path => $real_path,
+ path => $path ? {
+ 'absent' => "/var/www/htpasswds/${real_site}",
+ default => $path
+ },
line => "${username}:${real_password}",
}
}