2018-02-20 21:28:14 +01:00
|
|
|
---
|
2018-10-16 20:52:04 +02:00
|
|
|
- name: "(Setup: All NGINX) Ensure HTML Directory Exists"
|
|
|
|
file:
|
|
|
|
path: "{{ item.value.html_file_location }}"
|
|
|
|
state: directory
|
|
|
|
with_dict: "{{ nginx_html_demo_template }}"
|
|
|
|
when: nginx_html_demo_template_enable
|
|
|
|
|
|
|
|
- name: "(Setup: All NGINX) Dynamically Generate HTML Files"
|
|
|
|
template:
|
|
|
|
src: "{{ item.value.template_file }}"
|
|
|
|
dest: "{{ item.value.html_file_location }}/{{ item.value.html_file_name }}"
|
|
|
|
with_dict: "{{ nginx_html_demo_template }}"
|
|
|
|
when: nginx_html_demo_template_enable
|
|
|
|
|
2018-02-20 21:28:14 +01:00
|
|
|
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
|
|
|
template:
|
2018-10-16 20:52:04 +02:00
|
|
|
src: "{{ nginx_main_template.template_file }}"
|
|
|
|
dest: "{{ nginx_main_template.conf_file_location }}/{{ nginx_main_template.conf_file_name }}"
|
2018-04-18 02:21:31 +02:00
|
|
|
backup: yes
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_main_template_enable
|
2018-02-20 21:28:14 +01:00
|
|
|
notify: "(Handler: All OSs) Reload NGINX"
|
|
|
|
|
2018-04-05 23:32:37 +02:00
|
|
|
- name: "(Setup: All NGINX) Ensure NGINX HTTP Directory Exists"
|
2018-04-05 01:48:31 +02:00
|
|
|
file:
|
2018-10-16 20:52:04 +02:00
|
|
|
path: "{{ item.value.conf_file_location }}"
|
2018-04-05 01:48:31 +02:00
|
|
|
state: directory
|
2018-10-16 20:52:04 +02:00
|
|
|
with_dict: "{{ nginx_http_template }}"
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_http_template_enable
|
2018-04-05 01:48:31 +02:00
|
|
|
|
2018-02-20 21:28:14 +01:00
|
|
|
- name: "(Setup: All NGINX) Dynamically Generate NGINX HTTP Configuration Files"
|
|
|
|
template:
|
2018-10-16 20:52:04 +02:00
|
|
|
src: "{{ item.value.template_file }}"
|
|
|
|
dest: "{{ item.value.conf_file_location }}/{{ item.value.conf_file_name }}"
|
2018-04-18 02:21:31 +02:00
|
|
|
backup: yes
|
2018-10-16 20:52:04 +02:00
|
|
|
with_dict: "{{ nginx_http_template }}"
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_http_template_enable
|
2018-02-20 21:28:14 +01:00
|
|
|
notify: "(Handler: All OSs) Reload NGINX"
|
|
|
|
|
2018-04-05 23:32:37 +02:00
|
|
|
- name: "(Setup: All NGINX) Ensure NGINX Stream Directory Exists"
|
2018-04-05 01:48:31 +02:00
|
|
|
file:
|
2019-02-06 13:39:48 +01:00
|
|
|
path: "{{ item.value.conf_file_location }}"
|
2018-04-05 01:48:31 +02:00
|
|
|
state: directory
|
2019-02-06 13:39:48 +01:00
|
|
|
with_dict: "{{ nginx_stream_template }}"
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_stream_template_enable
|
2018-04-05 01:48:31 +02:00
|
|
|
|
2018-02-20 21:28:14 +01:00
|
|
|
- name: "(Setup: All NGINX) Dynamically Generate NGINX Stream Configuration Files"
|
|
|
|
template:
|
2019-02-06 13:39:48 +01:00
|
|
|
src: "{{ item.value.template_file }}"
|
|
|
|
dest: "{{ item.value.conf_file_location }}/{{ item.value.conf_file_name }}"
|
2018-04-18 02:21:31 +02:00
|
|
|
backup: yes
|
2019-02-06 13:39:48 +01:00
|
|
|
with_dict: "{{ nginx_stream_template }}"
|
2018-09-15 01:28:20 +02:00
|
|
|
when: nginx_stream_template_enable
|
2018-02-20 21:28:14 +01:00
|
|
|
notify: "(Handler: All OSs) Reload NGINX"
|