From 7cf3af29721c540dcdc40f9281dbbe13273574bf Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Wed, 16 Nov 2016 11:18:15 +0100 Subject: [PATCH] touch htpasswd file if it doesn't exist Fixes #70 --- nginx/users.sls | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nginx/users.sls b/nginx/users.sls index f5fa508..34a6672 100644 --- a/nginx/users.sls +++ b/nginx/users.sls @@ -5,6 +5,10 @@ htpasswd: pkg.installed: - name: {{ nginx.apache_utils }} +make sure {{ htauth }} exists: + file.exists: + - name: {{ htauth }} + {% for name, user in pillar.get('users', {}).items() %} {% if user['webauth'] is defined -%} @@ -18,4 +22,4 @@ nginx_user_{{name}}: - pkg: htpasswd {% endif -%} -{% endfor %} \ No newline at end of file +{% endfor %}