ansible-role-nginx/tasks/conf/template-config.yml
Alessandro Fael Garcia 147410ab03 Refactor templates
Refactor template variables and configuration scripts
2018-02-20 12:28:14 -08:00

23 lines
769 B
YAML

---
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
notify: "(Handler: All OSs) Reload NGINX"
- name: "(Setup: All NGINX) Dynamically Generate NGINX HTTP Configuration Files"
template:
src: "{{ item }}"
dest: /etc/nginx/conf.d/{{ item | basename | regex_replace('\.j2','') }}
with_fileglob:
- "../templates/http/*.j2"
notify: "(Handler: All OSs) Reload NGINX"
- name: "(Setup: All NGINX) Dynamically Generate NGINX Stream Configuration Files"
template:
src: "{{ item }}"
dest: /etc/nginx/conf.d/{{ item | basename | regex_replace('\.j2','') }}
with_fileglob:
- "../templates/stream/*.j2"
notify: "(Handler: All OSs) Reload NGINX"