Skip to content

Commit 8bb9b41

Browse files
authored
Merge pull request #27 from nginxinc/(bug)/fix-stat-path
Fix stat path
2 parents 67e35f4 + c545949 commit 8bb9b41

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tasks/conf/push-config.yml

Lines changed: 7 additions & 7 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_push_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_push_enable
11+
src: /etc/nginx/nginx.conf
12+
dest: /etc/nginx/nginx.conf.bak
13+
when: main_exists.stat.exists and main_exists.stat.isreg and main_push_enable
1414

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

2121
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
2222
copy:

0 commit comments

Comments
 (0)