From f3ef626ec4847e00429eb684baeb94f2f91ffbf8 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Wed, 24 Jan 2018 16:44:51 +0100 Subject: [PATCH 1/5] [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/5] [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: From 159f4da4d058d4a9aa9b579e3be22cfab23ffb17 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Fri, 26 Jan 2018 15:37:34 +0100 Subject: [PATCH 3/5] [README] include nginx.ng.certifcates --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index 2f61b7d..cf15a6b 100644 --- a/README.rst +++ b/README.rst @@ -83,6 +83,11 @@ Installs nginx from package, from the distribution repositories, the official ng Builds and installs nginx from source. +``nginx.ng.certificates`` +------------------- + +Manages the deployment of nginx certificates. + ``nginx.ng.config`` ------------------- From 28d106961754ba310156418af8d2d9d4bcfaf226 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Tue, 24 Apr 2018 11:01:29 +0200 Subject: [PATCH 4/5] [nginx/users] add makedirs to htpasswd deploy --- nginx/users.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx/users.sls b/nginx/users.sls index 34a6672..1cdbfd8 100644 --- a/nginx/users.sls +++ b/nginx/users.sls @@ -8,6 +8,7 @@ htpasswd: make sure {{ htauth }} exists: file.exists: - name: {{ htauth }} + - makedirs: True {% for name, user in pillar.get('users', {}).items() %} {% if user['webauth'] is defined -%} From 4da13b9f8bc4f4dc41b33873b9e9b6ea1e51b176 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Tue, 24 Apr 2018 11:20:08 +0200 Subject: [PATCH 5/5] [nginx/users] convert file.present into file.managed with no content --- nginx/users.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/users.sls b/nginx/users.sls index 1cdbfd8..db1414c 100644 --- a/nginx/users.sls +++ b/nginx/users.sls @@ -6,7 +6,7 @@ htpasswd: - name: {{ nginx.apache_utils }} make sure {{ htauth }} exists: - file.exists: + file.managed: - name: {{ htauth }} - makedirs: True