Backup/remove default.conf NGINX configuration file
Backup and then remove the default.conf configuration file created by NGINX upon initial installation
This commit is contained in:
parent
8bf17d77c0
commit
681395baad
@ -1,4 +1,22 @@
|
|||||||
---
|
---
|
||||||
|
- name: "(Setup: All NGINX) Check NGINX Default Configuration File Exists"
|
||||||
|
stat:
|
||||||
|
path: /etc/nginx/conf.d/default.conf
|
||||||
|
register: default_exists
|
||||||
|
|
||||||
|
- name: "(Setup: All NGINX) Backup NGINX Default Configuration File"
|
||||||
|
copy:
|
||||||
|
remote_src: yes
|
||||||
|
src: /etc/nginx/conf.d/default.conf
|
||||||
|
dest: /etc/nginx/conf.d/default.conf.bak
|
||||||
|
when: default_exists.stat.exists
|
||||||
|
|
||||||
|
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
||||||
|
file:
|
||||||
|
path: /etc/nginx/conf.d/default.conf
|
||||||
|
state: absent
|
||||||
|
when: default_exists.stat.exists
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
|
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
|
||||||
copy:
|
copy:
|
||||||
src: "{{ main_upload_location }}"
|
src: "{{ main_upload_location }}"
|
||||||
|
@ -1,4 +1,22 @@
|
|||||||
---
|
---
|
||||||
|
- name: "(Setup: All NGINX) Check NGINX Default Configuration File Exists"
|
||||||
|
stat:
|
||||||
|
path: /etc/nginx/conf.d/default.conf
|
||||||
|
register: default_exists
|
||||||
|
|
||||||
|
- name: "(Setup: All NGINX) Backup NGINX Default Configuration File"
|
||||||
|
copy:
|
||||||
|
remote_src: yes
|
||||||
|
src: /etc/nginx/conf.d/default.conf
|
||||||
|
dest: /etc/nginx/conf.d/default.conf.bak
|
||||||
|
when: default_exists.stat.exists
|
||||||
|
|
||||||
|
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
||||||
|
file:
|
||||||
|
path: /etc/nginx/conf.d/default.conf
|
||||||
|
state: absent
|
||||||
|
when: default_exists.stat.exists
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
||||||
template:
|
template:
|
||||||
src: nginx.conf.j2
|
src: nginx.conf.j2
|
||||||
|
Loading…
Reference in New Issue
Block a user