Browse Source

touch htpasswd file if it doesn't exist

Fixes #70
susefix
Arthur Lutz 8 years ago
parent
commit
7cf3af2972
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      nginx/users.sls

+ 5
- 1
nginx/users.sls 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 %}

Loading…
Cancel
Save