summaryrefslogtreecommitdiff
path: root/manifests/htpasswd_user.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
committerMicah Anderson <micah@riseup.net>2013-04-15 12:47:12 -0400
commit0e7099174fdef951c81880b51e23342fcde86374 (patch)
tree28e99fd804674e3ac025a73a061c73f0ce6d7870 /manifests/htpasswd_user.pp
parent3ac4d6249f50627c0827ce3812eb21d5b89ed974 (diff)
parentbf36ba5e988a7bb3f163ed0575020ef714519edc (diff)
Merge remote-tracking branch 'shared/master' into riseup
Conflicts: README
Diffstat (limited to 'manifests/htpasswd_user.pp')
-rw-r--r--manifests/htpasswd_user.pp11
1 files changed, 5 insertions, 6 deletions
diff --git a/manifests/htpasswd_user.pp b/manifests/htpasswd_user.pp
index 5a7c413..c4c5453 100644
--- a/manifests/htpasswd_user.pp
+++ b/manifests/htpasswd_user.pp
@@ -16,19 +16,18 @@ 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 {
$real_password = htpasswd_sha1($password)
}
- line{"htpasswd_for_${real_site}":
+ file_line{"htpasswd_for_${real_site}":
ensure => $ensure,
- file => $real_path,
+ path => $path ? {
+ 'absent' => "/var/www/htpasswds/${real_site}",
+ default => $path
+ },
line => "${username}:${real_password}",
}
}