浏览代码

PR #14: Change use of nginx_conf_path and nginx_vhost_path to match naming convention.

Jeff Geerling 10 年之前
父节点
当前提交
0ae5084e53
共有 3 个文件被更改,包括 4 次插入5 次删除
  1. 2 4
      templates/nginx.conf.j2
  2. 1 1
      vars/Debian.yml
  3. 1 0
      vars/RedHat.yml

+ 2 - 4
templates/nginx.conf.j2

@@ -47,10 +47,8 @@ http {
     }
     }
 {% endfor %}
 {% 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 }}/*;
     include {{ nginx_vhost_path }}/*;
 {% endif %}
 {% endif %}
 }
 }

+ 1 - 1
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_vhost_path: /etc/nginx/sites-enabled
 nginx_default_vhost_path: /etc/nginx/sites-enabled/default
 nginx_default_vhost_path: /etc/nginx/sites-enabled/default
 __nginx_user: "www-data"
 __nginx_user: "www-data"

+ 1 - 0
vars/RedHat.yml

@@ -1,4 +1,5 @@
 ---
 ---
+nginx_conf_path: /etc/nginx/conf.d
 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_default_vhost_path: /etc/nginx/conf.d/default.conf
 __nginx_user: "nginx"
 __nginx_user: "nginx"