diff options
author | Micah Anderson <micah@riseup.net> | 2013-12-16 17:29:02 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-12-16 17:29:02 -0500 |
commit | 15757eb2334e614bc90c8d5235834352f72261e4 (patch) | |
tree | f3a3783b50d782b0d8ca76a7884c64e3cbc08dd9 /manifests/htpasswd_user.pp | |
parent | 6158f2ad0cb07159b922b6036013a7be1e4dbab5 (diff) | |
parent | 88dc913a5da951b1a261b6cc6d9767aaf641287d (diff) |
Merge branch 'master' of labs.riseup.net:module_apache into riseup
Diffstat (limited to 'manifests/htpasswd_user.pp')
-rw-r--r-- | manifests/htpasswd_user.pp | 11 |
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}", } } |