summaryrefslogtreecommitdiff
path: root/manifests/defines/htpasswd.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/defines/htpasswd.pp')
-rw-r--r--manifests/defines/htpasswd.pp9
1 files changed, 5 insertions, 4 deletions
diff --git a/manifests/defines/htpasswd.pp b/manifests/defines/htpasswd.pp
index a24aa20..a702875 100644
--- a/manifests/defines/htpasswd.pp
+++ b/manifests/defines/htpasswd.pp
@@ -5,7 +5,7 @@ define apache::htpasswd_user(
$site = 'absent',
$username = 'absent',
$password,
- $password_iscrypted = 'false',
+ $password_iscrypted = false,
$ensure = 'present',
$path = 'absent'
){
@@ -21,9 +21,10 @@ define apache::htpasswd_user(
'absent': { $real_path = "/var/www/htpasswds/${real_site}" }
default: { $real_path = $path }
}
- case $password_iscrypted {
- 'false': { $real_password = htpasswd_sha1($password) }
- default: { $real_password = $password }
+ if $password_iscrypted {
+ $real_password = $password
+ } else
+ $real_password = htpasswd_sha1($password)
}
line{"htpasswd_for_${real_site}":