From fb36b5b643c1473f41de5414dd534f0876edf3c4 Mon Sep 17 00:00:00 2001 From: rickydelorier Date: Wed, 4 Apr 2018 19:48:31 -0400 Subject: [PATCH] Fix template path issues --- tasks/conf/template-config.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tasks/conf/template-config.yml b/tasks/conf/template-config.yml index 46490ec..e34ae53 100644 --- a/tasks/conf/template-config.yml +++ b/tasks/conf/template-config.yml @@ -5,18 +5,32 @@ dest: /etc/nginx/nginx.conf notify: "(Handler: All OSs) Reload NGINX" +- name: "(Setup: All NGINX) Ensures /etc/nginx/conf.d/http dir exists" + file: + path: /etc/nginx/conf.d/http + state: directory + when: http_template_enable + - name: "(Setup: All NGINX) Dynamically Generate NGINX HTTP Configuration Files" template: src: "{{ item }}" - dest: /etc/nginx/conf.d/{{ item | basename | regex_replace('\.j2','') }} + dest: /etc/nginx/conf.d/http/{{ item | basename | regex_replace('\.j2','') }} with_fileglob: - "../templates/http/*.j2" + when: http_template_enable notify: "(Handler: All OSs) Reload NGINX" +- name: "(Setup: All NGINX) Ensures /etc/nginx/conf.d/stream dir exists" + file: + path: /etc/nginx/conf.d/stream + state: directory + when: stream_template_enable + - name: "(Setup: All NGINX) Dynamically Generate NGINX Stream Configuration Files" template: src: "{{ item }}" - dest: /etc/nginx/conf.d/{{ item | basename | regex_replace('\.j2','') }} + dest: /etc/nginx/conf.d/stream/{{ item | basename | regex_replace('\.j2','') }} with_fileglob: - "../templates/stream/*.j2" + when: stream_template_enable notify: "(Handler: All OSs) Reload NGINX"