File tree Expand file tree Collapse file tree 2 files changed +6
-38
lines changed Expand file tree Collapse file tree 2 files changed +6
-38
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- - name : " (Setup: All NGINX) Check NGINX Default Configuration File Exists"
3
- stat :
4
- path : /etc/nginx/nginx.conf
5
- when : main_push_enable
6
- register : main_exists
7
-
8
- - name : " (Setup: All NGINX) Backup NGINX Default Configuration File"
9
- copy :
10
- remote_src : yes
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
14
-
15
- - name : " (Setup: All NGINX) Delete NGINX Default Configuration File"
16
- file :
17
- path : /etc/nginx/nginx.conf
18
- state : absent
19
- when : main_exists.stat.exists is defined and main_exists.stat.isreg and main_push_enable
20
-
21
2
- name : " (Setup: All NGINX) Upload NGINX Main Configuration File"
22
3
copy :
23
4
src : " {{ main_push_location }}"
24
5
dest : /etc/nginx/nginx.conf
6
+ backup : yes
25
7
notify : " (Handler: All OSs) Reload NGINX"
26
8
when : main_push_enable
27
9
35
17
copy :
36
18
src : " {{ item }}"
37
19
dest : /etc/nginx/conf.d/http
20
+ backup : yes
38
21
with_fileglob :
39
22
- " {{ http_push_location }}"
40
23
notify : " (Handler: All OSs) Reload NGINX"
50
33
copy :
51
34
src : " {{ item }}"
52
35
dest : /etc/nginx/conf.d/stream
36
+ backup : yes
53
37
with_fileglob :
54
38
- " {{ stream_push_location }}"
55
39
notify : " (Handler: All OSs) Reload NGINX"
Original file line number Diff line number Diff line change 1
1
---
2
- - name : " (Setup: All NGINX) Check NGINX Default Configuration File Exists"
3
- stat :
4
- path : /etc/nginx/nginx.conf
5
- when : main_template_enable
6
- register : main_exists
7
-
8
- - name : " (Setup: All NGINX) Backup NGINX Default Configuration File"
9
- copy :
10
- remote_src : yes
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
14
-
15
- - name : " (Setup: All NGINX) Delete NGINX Default Configuration File"
16
- file :
17
- path : /etc/nginx/conf.d/default.conf
18
- state : absent
19
- when : main_exists.stat.exists is defined and main_exists.stat.isreg and main_template_enable
20
-
21
2
- name : " (Setup: All NGINX) Dynamically Generate NGINX Main Configuration File"
22
3
template :
23
4
src : nginx.conf.j2
24
5
dest : /etc/nginx/nginx.conf
6
+ backup : yes
25
7
when : main_template_enable
26
8
notify : " (Handler: All OSs) Reload NGINX"
27
9
35
17
template :
36
18
src : " {{ item }}"
37
19
dest : /etc/nginx/conf.d/http/{{ item | basename | regex_replace('\.j2','') }}
20
+ backup : yes
38
21
with_fileglob :
39
22
- " ../templates/http/*.j2"
40
23
when : http_template_enable
50
33
template :
51
34
src : " {{ item }}"
52
35
dest : /etc/nginx/conf.d/stream/{{ item | basename | regex_replace('\.j2','') }}
36
+ backup : yes
53
37
with_fileglob :
54
38
- " ../templates/stream/*.j2"
55
39
when : stream_template_enable
You can’t perform that action at this time.
0 commit comments