File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
- name : " (Setup: All NGINX) Check NGINX Default Configuration File Exists"
3
3
stat :
4
4
path : /etc/nginx/conf.d/default.conf
5
+ when : main_upload_enable
5
6
register : default_exists
6
7
7
8
- name : " (Setup: All NGINX) Backup NGINX Default Configuration File"
8
9
copy :
9
10
remote_src : yes
10
11
src : /etc/nginx/conf.d/default.conf
11
12
dest : /etc/nginx/conf.d/default.conf.bak
12
- when : default_exists.stat.exists
13
+ when : default_exists.stat.exists && main_upload_enable
13
14
14
15
- name : " (Setup: All NGINX) Delete NGINX Default Configuration File"
15
16
file :
16
17
path : /etc/nginx/conf.d/default.conf
17
18
state : absent
18
- when : default_exists.stat.exists
19
+ when : default_exists.stat.exists && main_upload_enable
19
20
20
21
- name : " (Setup: All NGINX) Upload NGINX Main Configuration File"
21
22
copy :
Original file line number Diff line number Diff line change 2
2
- name : " (Setup: All NGINX) Check NGINX Default Configuration File Exists"
3
3
stat :
4
4
path : /etc/nginx/conf.d/default.conf
5
+ when : main_template_enable
5
6
register : default_exists
6
7
7
8
- name : " (Setup: All NGINX) Backup NGINX Default Configuration File"
8
9
copy :
9
10
remote_src : yes
10
11
src : /etc/nginx/conf.d/default.conf
11
12
dest : /etc/nginx/conf.d/default.conf.bak
12
- when : default_exists.stat.exists
13
+ when : default_exists.stat.exists && main_template_enable
13
14
14
15
- name : " (Setup: All NGINX) Delete NGINX Default Configuration File"
15
16
file :
16
17
path : /etc/nginx/conf.d/default.conf
17
18
state : absent
18
- when : default_exists.stat.exists
19
+ when : default_exists.stat.exists && main_template_enable
19
20
20
21
- name : " (Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
21
22
template :
22
23
src : nginx.conf.j2
23
24
dest : /etc/nginx/nginx.conf
25
+ when : main_template_enable
24
26
notify : " (Handler: All OSs) Reload NGINX"
25
27
26
28
- name : " (Setup: All NGINX) Ensure NGINX HTTP Directory Exists"
You can’t perform that action at this time.
0 commit comments