File tree Expand file tree Collapse file tree 9 files changed +23
-23
lines changed Expand file tree Collapse file tree 9 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
- name : " (Setup: All NGINX) Upload NGINX Main Configuration File"
3
3
copy :
4
- src : " {{ main_push_location }}"
4
+ src : " {{ nginx_main_push_location }}"
5
5
dest : /etc/nginx/nginx.conf
6
6
backup : yes
7
7
notify : " (Handler: All OSs) Reload NGINX"
19
19
dest : /etc/nginx/conf.d/http
20
20
backup : yes
21
21
with_fileglob :
22
- - " {{ http_push_location }}"
22
+ - " {{ nginx_http_push_location }}"
23
23
notify : " (Handler: All OSs) Reload NGINX"
24
24
when : nginx_http_push_enable
25
25
35
35
dest : /etc/nginx/conf.d/stream
36
36
backup : yes
37
37
with_fileglob :
38
- - " {{ stream_push_location }}"
38
+ - " {{ nginx_stream_push_location }}"
39
39
notify : " (Handler: All OSs) Reload NGINX"
40
40
when : nginx_stream_push_enable
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : " (Setup: NGINX Plus) Setup NGINX Plus API"
3
3
blockinfile :
4
- path : " {{ (http_template_enable ) | ternary('/etc/nginx/conf.d/http/api.conf','/etc/nginx/conf.d/api.conf') }}"
4
+ path : " {{ (nginx_http_template_enable ) | ternary('/etc/nginx/conf.d/http/api.conf','/etc/nginx/conf.d/api.conf') }}"
5
5
create : yes
6
6
block : |
7
7
server {
8
8
listen 8080;
9
9
location /api {
10
- {% if rest_api_write %}
10
+ {% if nginx_rest_api_write %}
11
11
api write=on;
12
12
{% else %}
13
13
api;
14
14
{% endif %}
15
15
}
16
- {% if rest_api_dashboard %}
16
+ {% if nginx_rest_api_dashboard %}
17
17
location = /dashboard.html {
18
18
root /usr/share/nginx/html;
19
19
}
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : " (Setup: NGINX Open Source) Enable NGINX Open Source Status"
3
3
blockinfile :
4
- path : " {{ (http_template_enable ) | ternary('/etc/nginx/conf.d/http/stub_status.conf','/etc/nginx/conf.d/stub_status.conf') }}"
4
+ path : " {{ (nginx_http_template_enable ) | ternary('/etc/nginx/conf.d/http/stub_status.conf','/etc/nginx/conf.d/stub_status.conf') }}"
5
5
create : yes
6
6
block : |
7
7
server {
17
17
18
18
- name : " (Setup: NGINX Plus) Enable NGINX Plus Status"
19
19
blockinfile :
20
- path : " {{ (http_template_enable ) | ternary('/etc/nginx/conf.d/http/status.conf','/etc/nginx/conf.d/status.conf') }}"
20
+ path : " {{ (nginx_http_template_enable ) | ternary('/etc/nginx/conf.d/http/status.conf','/etc/nginx/conf.d/status.conf') }}"
21
21
create : yes
22
22
block : |
23
23
server {
Original file line number Diff line number Diff line change 26
26
lineinfile :
27
27
dest : /etc/controller-agent/agent.conf
28
28
regexp : api_key =.*
29
- line : " api_key = {{ controller_api_key }}"
29
+ line : " api_key = {{ nginx_controller_api_key }}"
30
30
31
31
- name : " (Setup: All OSs) Configure NGINX Controller Agent API URL"
32
32
lineinfile :
33
33
dest : /etc/controller-agent/agent.conf
34
34
regexp : api_url =.*
35
- line : " api_url = {{ controller_api_endpoint }}"
35
+ line : " api_url = {{ nginx_controller_api_endpoint }}"
36
36
37
37
- name : " (Setup: All OSs) Configure NGINX Controller Agent API Hostname"
38
38
lineinfile :
Original file line number Diff line number Diff line change 28
28
when : ansible_os_family == "FreeBSD"
29
29
notify : " (Handler: All OSs) Start NGINX"
30
30
31
- when : install_from == "nginx_repository"
31
+ when : nginx_install_from == "nginx_repository"
32
32
33
33
- name : " (Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
34
34
package :
Original file line number Diff line number Diff line change 3
3
package :
4
4
name : " {{ item }}"
5
5
state : present
6
- with_items : " {{ unit_modules }}"
6
+ with_items : " {{ nginx_unit_modules }}"
7
7
when : ansible_os_family != "FreeBSD"
8
8
notify : " (Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
9
9
10
10
- name : " (Install: FreeBSD) Install NGINX Unit Modules"
11
11
portinstall :
12
12
name : " {{ item }}"
13
13
state : present
14
- with_items : " {{ unit_modules }}"
14
+ with_items : " {{ nginx_unit_modules }}"
15
15
when : ansible_os_family == "FreeBSD"
16
16
notify : " (Handler: FreeBSD) Start NGINX Unit"
Original file line number Diff line number Diff line change 1
1
server {
2
- listen {{ http_template_listen }};
3
- server_name {{ http_template_server_name }};
2
+ listen {{ nginx_http_template_listen }};
3
+ server_name {{ nginx_http_template_server_name }};
4
4
5
5
#charset koi8-r;
6
6
#access_log /var/log/nginx/host.access.log main;
Original file line number Diff line number Diff line change 1
- user {{ main_template_user }};
2
- worker_processes {{ main_template_worker_processes }};
1
+ user {{ nginx_main_template_user }};
2
+ worker_processes {{ nginx_main_template_worker_processes }};
3
3
4
- error_log /var/log/nginx/error.log {{ main_template_error_level }};
4
+ error_log /var/log/nginx/error.log {{ nginx_main_template_error_level }};
5
5
pid /var/run/nginx.pid;
6
6
7
7
8
8
events {
9
- worker_connections {{ main_template_worker_connections }};
9
+ worker_connections {{ nginx_main_template_worker_connections }};
10
10
}
11
11
12
- {% if http_template_enable %}
12
+ {% if nginx_http_template_enable %}
13
13
http {
14
14
include /etc/nginx/mime.types;
15
15
default_type application/octet-stream;
@@ -23,15 +23,15 @@ http {
23
23
sendfile on;
24
24
#tcp_nopush on;
25
25
26
- keepalive_timeout {{ http_template_keepalive_timeout }};
26
+ keepalive_timeout {{ nginx_http_template_keepalive_timeout }};
27
27
28
28
#gzip on;
29
29
30
30
include /etc/nginx/conf.d/http/*.conf;
31
31
}
32
32
{% endif %}
33
33
34
- {% if stream_template_enable %}
34
+ {% if nginx_stream_template_enable %}
35
35
stream {
36
36
include /etc/nginx/conf.d/stream/*.conf;
37
37
}
Original file line number Diff line number Diff line change 1
1
server {
2
- listen {{ stream_template_listen }};
2
+ listen {{ nginx_stream_template_listen }};
3
3
}
You can’t perform that action at this time.
0 commit comments