diff options
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}", } } |