touch htpasswd file if it doesn't exist

Fixes #70
This commit is contained in:
Arthur Lutz 2016-11-16 11:18:15 +01:00 committed by GitHub
parent 3c6f0e343e
commit 7cf3af2972

View File

@ -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 %}
{% endfor %}