diff --git a/tasks/conf/push-config.yml b/tasks/conf/push-config.yml index e1ab3c7..2768398 100644 --- a/tasks/conf/push-config.yml +++ b/tasks/conf/push-config.yml @@ -1,7 +1,7 @@ --- - name: "(Setup: All NGINX) Upload NGINX Main Configuration File" copy: - src: "{{ main_push_location }}" + src: "{{ nginx_main_push_location }}" dest: /etc/nginx/nginx.conf backup: yes notify: "(Handler: All OSs) Reload NGINX" @@ -19,7 +19,7 @@ dest: /etc/nginx/conf.d/http backup: yes with_fileglob: - - "{{ http_push_location }}" + - "{{ nginx_http_push_location }}" notify: "(Handler: All OSs) Reload NGINX" when: nginx_http_push_enable @@ -35,6 +35,6 @@ dest: /etc/nginx/conf.d/stream backup: yes with_fileglob: - - "{{ stream_push_location }}" + - "{{ nginx_stream_push_location }}" notify: "(Handler: All OSs) Reload NGINX" when: nginx_stream_push_enable diff --git a/tasks/conf/setup-rest-api.yml b/tasks/conf/setup-rest-api.yml index 67abbba..66f69e2 100644 --- a/tasks/conf/setup-rest-api.yml +++ b/tasks/conf/setup-rest-api.yml @@ -1,19 +1,19 @@ --- - name: "(Setup: NGINX Plus) Setup NGINX Plus API" blockinfile: - path: "{{ (http_template_enable) | ternary('/etc/nginx/conf.d/http/api.conf','/etc/nginx/conf.d/api.conf') }}" + path: "{{ (nginx_http_template_enable) | ternary('/etc/nginx/conf.d/http/api.conf','/etc/nginx/conf.d/api.conf') }}" create: yes block: | server { listen 8080; location /api { - {% if rest_api_write %} + {% if nginx_rest_api_write %} api write=on; {% else %} api; {% endif %} } - {% if rest_api_dashboard %} + {% if nginx_rest_api_dashboard %} location = /dashboard.html { root /usr/share/nginx/html; } diff --git a/tasks/conf/setup-status.yml b/tasks/conf/setup-status.yml index 7a373a7..fd4d96c 100644 --- a/tasks/conf/setup-status.yml +++ b/tasks/conf/setup-status.yml @@ -1,7 +1,7 @@ --- - name: "(Setup: NGINX Open Source) Enable NGINX Open Source Status" blockinfile: - path: "{{ (http_template_enable) | ternary('/etc/nginx/conf.d/http/stub_status.conf','/etc/nginx/conf.d/stub_status.conf') }}" + path: "{{ (nginx_http_template_enable) | ternary('/etc/nginx/conf.d/http/stub_status.conf','/etc/nginx/conf.d/stub_status.conf') }}" create: yes block: | server { @@ -17,7 +17,7 @@ - name: "(Setup: NGINX Plus) Enable NGINX Plus Status" blockinfile: - path: "{{ (http_template_enable) | ternary('/etc/nginx/conf.d/http/status.conf','/etc/nginx/conf.d/status.conf') }}" + path: "{{ (nginx_http_template_enable) | ternary('/etc/nginx/conf.d/http/status.conf','/etc/nginx/conf.d/status.conf') }}" create: yes block: | server { diff --git a/tasks/controller/install-controller.yml b/tasks/controller/install-controller.yml index 0dd4bde..2e818c5 100644 --- a/tasks/controller/install-controller.yml +++ b/tasks/controller/install-controller.yml @@ -26,13 +26,13 @@ lineinfile: dest: /etc/controller-agent/agent.conf regexp: api_key =.* - line: "api_key = {{ controller_api_key }}" + line: "api_key = {{ nginx_controller_api_key }}" - name: "(Setup: All OSs) Configure NGINX Controller Agent API URL" lineinfile: dest: /etc/controller-agent/agent.conf regexp: api_url =.* - line: "api_url = {{ controller_api_endpoint }}" + line: "api_url = {{ nginx_controller_api_endpoint }}" - name: "(Setup: All OSs) Configure NGINX Controller Agent API Hostname" lineinfile: diff --git a/tasks/opensource/install-oss.yml b/tasks/opensource/install-oss.yml index aa2d6fd..a76e7c5 100644 --- a/tasks/opensource/install-oss.yml +++ b/tasks/opensource/install-oss.yml @@ -28,7 +28,7 @@ when: ansible_os_family == "FreeBSD" notify: "(Handler: All OSs) Start NGINX" - when: install_from == "nginx_repository" + when: nginx_install_from == "nginx_repository" - name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX" package: diff --git a/tasks/unit/install-modules.yml b/tasks/unit/install-modules.yml index 09d5cec..cc5ce94 100644 --- a/tasks/unit/install-modules.yml +++ b/tasks/unit/install-modules.yml @@ -3,7 +3,7 @@ package: name: "{{ item }}" state: present - with_items: "{{ unit_modules }}" + with_items: "{{ nginx_unit_modules }}" when: ansible_os_family != "FreeBSD" notify: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit" @@ -11,6 +11,6 @@ portinstall: name: "{{ item }}" state: present - with_items: "{{ unit_modules }}" + with_items: "{{ nginx_unit_modules }}" when: ansible_os_family == "FreeBSD" notify: "(Handler: FreeBSD) Start NGINX Unit" diff --git a/templates/http/default.conf.j2 b/templates/http/default.conf.j2 index 761fef6..0005c36 100644 --- a/templates/http/default.conf.j2 +++ b/templates/http/default.conf.j2 @@ -1,6 +1,6 @@ server { - listen {{ http_template_listen }}; - server_name {{ http_template_server_name }}; + listen {{ nginx_http_template_listen }}; + server_name {{ nginx_http_template_server_name }}; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 153696e..2548773 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -1,15 +1,15 @@ -user {{ main_template_user }}; -worker_processes {{ main_template_worker_processes }}; +user {{ nginx_main_template_user }}; +worker_processes {{ nginx_main_template_worker_processes }}; -error_log /var/log/nginx/error.log {{ main_template_error_level }}; +error_log /var/log/nginx/error.log {{ nginx_main_template_error_level }}; pid /var/run/nginx.pid; events { - worker_connections {{ main_template_worker_connections }}; + worker_connections {{ nginx_main_template_worker_connections }}; } -{% if http_template_enable %} +{% if nginx_http_template_enable %} http { include /etc/nginx/mime.types; default_type application/octet-stream; @@ -23,7 +23,7 @@ http { sendfile on; #tcp_nopush on; - keepalive_timeout {{ http_template_keepalive_timeout }}; + keepalive_timeout {{ nginx_http_template_keepalive_timeout }}; #gzip on; @@ -31,7 +31,7 @@ http { } {% endif %} -{% if stream_template_enable %} +{% if nginx_stream_template_enable %} stream { include /etc/nginx/conf.d/stream/*.conf; } diff --git a/templates/stream/default.conf.j2 b/templates/stream/default.conf.j2 index 5462c86..e462f29 100644 --- a/templates/stream/default.conf.j2 +++ b/templates/stream/default.conf.j2 @@ -1,3 +1,3 @@ server { - listen {{ stream_template_listen }}; + listen {{ nginx_stream_template_listen }}; }