From 0ae5084e532640966221f2ee77f52004d3f331dd Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Tue, 12 May 2015 17:47:15 -0700 Subject: [PATCH] PR #14: Change use of nginx_conf_path and nginx_vhost_path to match naming convention. --- templates/nginx.conf.j2 | 6 ++---- vars/Debian.yml | 2 +- vars/RedHat.yml | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index cace955..be9b993 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -47,10 +47,8 @@ http { } {% endfor %} -{% if nginx_conf_path is defined %} - include {{ nginx_conf_path }}; -{% endif %} -{% if nginx_vhost_path is defined %} + include {{ nginx_conf_path }}/*; +{% if nginx_conf_path != nginx_vhost_path %} include {{ nginx_vhost_path }}/*; {% endif %} } diff --git a/vars/Debian.yml b/vars/Debian.yml index d84af98..b1bad08 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -1,5 +1,5 @@ --- -nginx_conf_path: /etc/nginx/conf.d/*.conf +nginx_conf_path: /etc/nginx/conf.d nginx_vhost_path: /etc/nginx/sites-enabled nginx_default_vhost_path: /etc/nginx/sites-enabled/default __nginx_user: "www-data" diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 2412304..fb9049e 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -1,4 +1,5 @@ --- +nginx_conf_path: /etc/nginx/conf.d nginx_vhost_path: /etc/nginx/conf.d nginx_default_vhost_path: /etc/nginx/conf.d/default.conf __nginx_user: "nginx"