Skip to content

Commit c7cd484

Browse files
authored
Merge pull request #28 from nginxinc/(bug)/fix-stat
Fix stat path
2 parents 8bb9b41 + b865783 commit c7cd484

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tasks/conf/template-config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
- name: "(Setup: All NGINX) Check NGINX Default Configuration File Exists"
33
stat:
4-
path: /etc/nginx/conf.d/default.conf
4+
path: /etc/nginx/nginx.conf
55
when: main_template_enable
6-
register: default_exists
6+
register: main_exists
77

88
- name: "(Setup: All NGINX) Backup NGINX Default Configuration File"
99
copy:
1010
remote_src: yes
11-
src: /etc/nginx/conf.d/default.conf
12-
dest: /etc/nginx/conf.d/default.conf.bak
13-
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
11+
src: /etc/nginx/nginx.conf
12+
dest: /etc/nginx/nginx.conf.bak
13+
when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
1414

1515
- name: "(Setup: All NGINX) Delete NGINX Default Configuration File"
1616
file:
1717
path: /etc/nginx/conf.d/default.conf
1818
state: absent
19-
when: default_exists.stat.exists is defined and default_exists.stat.isreg and main_template_enable
19+
when: main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
2020

2121
- name: "(Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
2222
template:

0 commit comments

Comments
 (0)