From b11bb5a891e96fafa01a431db8e168a41948b88a Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 9 Oct 2011 03:34:29 +0200 Subject: migrate to new file_line type --- manifests/htpasswd_user.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/htpasswd_user.pp') diff --git a/manifests/htpasswd_user.pp b/manifests/htpasswd_user.pp index 5a7c413..9fcea0a 100644 --- a/manifests/htpasswd_user.pp +++ b/manifests/htpasswd_user.pp @@ -26,9 +26,9 @@ define apache::htpasswd_user( $real_password = htpasswd_sha1($password) } - line{"htpasswd_for_${real_site}": + file_line{"htpasswd_for_${real_site}": ensure => $ensure, - file => $real_path, + path => $real_path, line => "${username}:${real_password}", } } -- cgit v1.2.3 From 076909377eaa3aa41936e3acb7e02a9b5b14d493 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 31 May 2012 11:38:45 +0200 Subject: fix various puppet language things --- manifests/htpasswd_user.pp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'manifests/htpasswd_user.pp') 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}", } } -- cgit v1.2.3