Skip to content

Commit fb36b5b

Browse files
committed
Fix template path issues
1 parent fd7a7fa commit fb36b5b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tasks/conf/template-config.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,32 @@
55
dest: /etc/nginx/nginx.conf
66
notify: "(Handler: All OSs) Reload NGINX"
77

8+
- name: "(Setup: All NGINX) Ensures /etc/nginx/conf.d/http dir exists"
9+
file:
10+
path: /etc/nginx/conf.d/http
11+
state: directory
12+
when: http_template_enable
13+
814
- name: "(Setup: All NGINX) Dynamically Generate NGINX HTTP Configuration Files"
915
template:
1016
src: "{{ item }}"
11-
dest: /etc/nginx/conf.d/{{ item | basename | regex_replace('\.j2','') }}
17+
dest: /etc/nginx/conf.d/http/{{ item | basename | regex_replace('\.j2','') }}
1218
with_fileglob:
1319
- "../templates/http/*.j2"
20+
when: http_template_enable
1421
notify: "(Handler: All OSs) Reload NGINX"
1522

23+
- name: "(Setup: All NGINX) Ensures /etc/nginx/conf.d/stream dir exists"
24+
file:
25+
path: /etc/nginx/conf.d/stream
26+
state: directory
27+
when: stream_template_enable
28+
1629
- name: "(Setup: All NGINX) Dynamically Generate NGINX Stream Configuration Files"
1730
template:
1831
src: "{{ item }}"
19-
dest: /etc/nginx/conf.d/{{ item | basename | regex_replace('\.j2','') }}
32+
dest: /etc/nginx/conf.d/stream/{{ item | basename | regex_replace('\.j2','') }}
2033
with_fileglob:
2134
- "../templates/stream/*.j2"
35+
when: stream_template_enable
2236
notify: "(Handler: All OSs) Reload NGINX"

0 commit comments

Comments
 (0)