Skip to content

Commit 9fea522

Browse files
committed
Fix more repository variables
1 parent fd3a21f commit 9fea522

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

tasks/conf/push-config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
33
copy:
4-
src: "{{ main_push_location }}"
4+
src: "{{ nginx_main_push_location }}"
55
dest: /etc/nginx/nginx.conf
66
backup: yes
77
notify: "(Handler: All OSs) Reload NGINX"
@@ -19,7 +19,7 @@
1919
dest: /etc/nginx/conf.d/http
2020
backup: yes
2121
with_fileglob:
22-
- "{{ http_push_location }}"
22+
- "{{ nginx_http_push_location }}"
2323
notify: "(Handler: All OSs) Reload NGINX"
2424
when: nginx_http_push_enable
2525

@@ -35,6 +35,6 @@
3535
dest: /etc/nginx/conf.d/stream
3636
backup: yes
3737
with_fileglob:
38-
- "{{ stream_push_location }}"
38+
- "{{ nginx_stream_push_location }}"
3939
notify: "(Handler: All OSs) Reload NGINX"
4040
when: nginx_stream_push_enable

tasks/conf/setup-rest-api.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
- name: "(Setup: NGINX Plus) Setup NGINX Plus API"
33
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') }}"
55
create: yes
66
block: |
77
server {
88
listen 8080;
99
location /api {
10-
{% if rest_api_write %}
10+
{% if nginx_rest_api_write %}
1111
api write=on;
1212
{% else %}
1313
api;
1414
{% endif %}
1515
}
16-
{% if rest_api_dashboard %}
16+
{% if nginx_rest_api_dashboard %}
1717
location = /dashboard.html {
1818
root /usr/share/nginx/html;
1919
}

tasks/conf/setup-status.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: "(Setup: NGINX Open Source) Enable NGINX Open Source Status"
33
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') }}"
55
create: yes
66
block: |
77
server {
@@ -17,7 +17,7 @@
1717

1818
- name: "(Setup: NGINX Plus) Enable NGINX Plus Status"
1919
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') }}"
2121
create: yes
2222
block: |
2323
server {

tasks/controller/install-controller.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
lineinfile:
2727
dest: /etc/controller-agent/agent.conf
2828
regexp: api_key =.*
29-
line: "api_key = {{ controller_api_key }}"
29+
line: "api_key = {{ nginx_controller_api_key }}"
3030

3131
- name: "(Setup: All OSs) Configure NGINX Controller Agent API URL"
3232
lineinfile:
3333
dest: /etc/controller-agent/agent.conf
3434
regexp: api_url =.*
35-
line: "api_url = {{ controller_api_endpoint }}"
35+
line: "api_url = {{ nginx_controller_api_endpoint }}"
3636

3737
- name: "(Setup: All OSs) Configure NGINX Controller Agent API Hostname"
3838
lineinfile:

tasks/opensource/install-oss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
when: ansible_os_family == "FreeBSD"
2929
notify: "(Handler: All OSs) Start NGINX"
3030

31-
when: install_from == "nginx_repository"
31+
when: nginx_install_from == "nginx_repository"
3232

3333
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
3434
package:

tasks/unit/install-modules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
package:
44
name: "{{ item }}"
55
state: present
6-
with_items: "{{ unit_modules }}"
6+
with_items: "{{ nginx_unit_modules }}"
77
when: ansible_os_family != "FreeBSD"
88
notify: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
99

1010
- name: "(Install: FreeBSD) Install NGINX Unit Modules"
1111
portinstall:
1212
name: "{{ item }}"
1313
state: present
14-
with_items: "{{ unit_modules }}"
14+
with_items: "{{ nginx_unit_modules }}"
1515
when: ansible_os_family == "FreeBSD"
1616
notify: "(Handler: FreeBSD) Start NGINX Unit"

templates/http/default.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
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 }};
44

55
#charset koi8-r;
66
#access_log /var/log/nginx/host.access.log main;

templates/nginx.conf.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
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 }};
33

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 }};
55
pid /var/run/nginx.pid;
66

77

88
events {
9-
worker_connections {{ main_template_worker_connections }};
9+
worker_connections {{ nginx_main_template_worker_connections }};
1010
}
1111

12-
{% if http_template_enable %}
12+
{% if nginx_http_template_enable %}
1313
http {
1414
include /etc/nginx/mime.types;
1515
default_type application/octet-stream;
@@ -23,15 +23,15 @@ http {
2323
sendfile on;
2424
#tcp_nopush on;
2525

26-
keepalive_timeout {{ http_template_keepalive_timeout }};
26+
keepalive_timeout {{ nginx_http_template_keepalive_timeout }};
2727

2828
#gzip on;
2929

3030
include /etc/nginx/conf.d/http/*.conf;
3131
}
3232
{% endif %}
3333

34-
{% if stream_template_enable %}
34+
{% if nginx_stream_template_enable %}
3535
stream {
3636
include /etc/nginx/conf.d/stream/*.conf;
3737
}

templates/stream/default.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
server {
2-
listen {{ stream_template_listen }};
2+
listen {{ nginx_stream_template_listen }};
33
}

0 commit comments

Comments
 (0)