Fix stat path
Use the path for nginx.conf instead of default.conf
This commit is contained in:
parent
8bb9b41f02
commit
b8657834f8
@ -1,22 +1,22 @@
|
|||||||
---
|
---
|
||||||
- name: "(Setup: All NGINX) Check NGINX Default Configuration File Exists"
|
- name: "(Setup: All NGINX) Check NGINX Default Configuration File Exists"
|
||||||
stat:
|
stat:
|
||||||
path: /etc/nginx/conf.d/default.conf
|
path: /etc/nginx/nginx.conf
|
||||||
when: main_template_enable
|
when: main_template_enable
|
||||||
register: default_exists
|
register: main_exists
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Backup NGINX Default Configuration File"
|
- name: "(Setup: All NGINX) Backup NGINX Default Configuration File"
|
||||||
copy:
|
copy:
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: /etc/nginx/conf.d/default.conf
|
src: /etc/nginx/nginx.conf
|
||||||
dest: /etc/nginx/conf.d/default.conf.bak
|
dest: /etc/nginx/nginx.conf.bak
|
||||||
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
|
when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
|
||||||
file:
|
file:
|
||||||
path: /etc/nginx/conf.d/default.conf
|
path: /etc/nginx/conf.d/default.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
|
when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
|
||||||
|
|
||||||
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
|
||||||
template:
|
template:
|
||||||
|
Loading…
Reference in New Issue
Block a user