From f3ef626ec4847e00429eb684baeb94f2f91ffbf8 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Wed, 24 Jan 2018 16:44:51 +0100 Subject: [PATCH 1/2] [users.sls] touch /etc/nginx/.htpasswd --- nginx/users.sls | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/users.sls b/nginx/users.sls index 34a6672..83ca4e1 100644 --- a/nginx/users.sls +++ b/nginx/users.sls @@ -5,6 +5,10 @@ htpasswd: pkg.installed: - name: {{ nginx.apache_utils }} +touch /etc/nginx/.htpasswd: + cmd.run: + - creates: /etc/nginx/.htpasswd + make sure {{ htauth }} exists: file.exists: - name: {{ htauth }} From 78ddf90f5b188942bc1aab3ffd7ed905fe7d79e7 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Wed, 24 Jan 2018 16:56:43 +0100 Subject: [PATCH 2/2] [users] use {{ htauth }} variable --- nginx/users.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/users.sls b/nginx/users.sls index 83ca4e1..8f3a65e 100644 --- a/nginx/users.sls +++ b/nginx/users.sls @@ -5,9 +5,9 @@ htpasswd: pkg.installed: - name: {{ nginx.apache_utils }} -touch /etc/nginx/.htpasswd: +touch {{ htauth }}: cmd.run: - - creates: /etc/nginx/.htpasswd + - creates: {{ htauth }} make sure {{ htauth }} exists: file.exists: