40d5b0bb2c
Use the backup parameter in the copy/template modules instead of using a convoluted backup system
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
---
|
|
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
|
|
copy:
|
|
src: "{{ main_push_location }}"
|
|
dest: /etc/nginx/nginx.conf
|
|
backup: yes
|
|
notify: "(Handler: All OSs) Reload NGINX"
|
|
when: main_push_enable
|
|
|
|
- name: "(Setup: All NGINX) Ensure NGINX HTTP Directory Exists"
|
|
file:
|
|
path: /etc/nginx/conf.d/http
|
|
state: directory
|
|
when: http_push_enable
|
|
|
|
- name: "(Setup: All NGINX) Upload NGINX HTTP Configuration Files"
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: /etc/nginx/conf.d/http
|
|
backup: yes
|
|
with_fileglob:
|
|
- "{{ http_push_location }}"
|
|
notify: "(Handler: All OSs) Reload NGINX"
|
|
when: http_push_enable
|
|
|
|
- name: "(Setup: All NGINX) Ensure NGINX Stream Directory Exists"
|
|
file:
|
|
path: /etc/nginx/conf.d/stream
|
|
state: directory
|
|
when: stream_push_enable
|
|
|
|
- name: "(Setup: All NGINX) Upload NGINX Stream Configuration Files"
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: /etc/nginx/conf.d/stream
|
|
backup: yes
|
|
with_fileglob:
|
|
- "{{ stream_push_location }}"
|
|
notify: "(Handler: All OSs) Reload NGINX"
|
|
when: stream_push_enable
|