From a73097aa191851e0a1bdcf97172a45c6cf1e8a50 Mon Sep 17 00:00:00 2001 From: Benjamin Mosior Date: Sun, 27 Sep 2015 13:09:57 -0400 Subject: [PATCH] Resolve missing dependency for nginx home dir. To resolve the occurrence of the below error, a dependency has been added to require the nginx user first be created, either by nginx package installation or explicitly with salt (when installing nginx from source). ``` ---------- ID: /var/www Function: file.directory Result: False Comment: User nginx is not available Group nginx is not available Started: 15:50:02.070799 Duration: 0.531 ms Changes: ---------- ``` --- nginx/common.sls | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nginx/common.sls b/nginx/common.sls index 2f0d341..93d0972 100644 --- a/nginx/common.sls +++ b/nginx/common.sls @@ -11,6 +11,13 @@ - group: {{ nginx_map.default_group }} - mode: 0755 - makedirs: True + - require: + {%- if pillar.get('nginx', {}).get('install_from_source', false) %} + - user: {{ nginx_map.default_user }} + - group: {{ nginx_map.default_group }} + {%- else %} + - pkg: nginx + {% endif %} /usr/share/nginx: file: