From c02bf089a47027a097095a7f0c6313769ac661b7 Mon Sep 17 00:00:00 2001 From: Mark Wilde Date: Wed, 29 Apr 2015 12:58:08 +0100 Subject: [PATCH] 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"