From c02bf089a47027a097095a7f0c6313769ac661b7 Mon Sep 17 00:00:00 2001 From: Mark Wilde Date: Wed, 29 Apr 2015 12:58:08 +0100 Subject: [PATCH 1/2] Added additional nginx_conf_path for Debian For Debian systems both conf.d and sites-enabled should be included by default. Redhat systems have not been changed. Issues came up using Kibana on Ubuntu as it installs kibana.conf in the conf.d folder. --- templates/nginx.conf.j2 | 7 ++++++- vars/Debian.yml | 3 ++- vars/RedHat.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index a43202c..2f40470 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -47,5 +47,10 @@ http { } {% endfor %} - include {{ nginx_vhost_path }}/*; +{% if nginx_conf_path is defined %} + include {{ nginx_conf_path }}; +{% endif %} +{% if nginx_vhost_path is defined %} + include {{ nginx_vhost_path }}; +{% endif %} } diff --git a/vars/Debian.yml b/vars/Debian.yml index b78b7c5..77881d1 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -1,4 +1,5 @@ --- -nginx_vhost_path: /etc/nginx/sites-enabled +nginx_conf_path: /etc/nginx/conf.d/*.conf +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..e727d4c 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -1,4 +1,4 @@ --- -nginx_vhost_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" From 3e8df12f7afaaa9863bb361e0f41ab1b9a9eedcf Mon Sep 17 00:00:00 2001 From: Mark Wilde Date: Fri, 1 May 2015 10:18:07 +0100 Subject: [PATCH 2/2] Updated nginx_vhost_path to move /* --- templates/nginx.conf.j2 | 2 +- vars/Debian.yml | 2 +- vars/RedHat.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 2f40470..cace955 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -51,6 +51,6 @@ http { include {{ nginx_conf_path }}; {% endif %} {% if nginx_vhost_path is defined %} - include {{ nginx_vhost_path }}; + include {{ nginx_vhost_path }}/*; {% endif %} } diff --git a/vars/Debian.yml b/vars/Debian.yml index 77881d1..d84af98 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -1,5 +1,5 @@ --- nginx_conf_path: /etc/nginx/conf.d/*.conf -nginx_vhost_path: /etc/nginx/sites-enabled/* +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 e727d4c..2412304 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -1,4 +1,4 @@ --- -nginx_vhost_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"