Fix more repository variables

This commit is contained in:
Alessandro Fael Garcia 2018-09-14 17:27:12 -07:00
parent fd3a21f0c0
commit 9fea522566
9 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
--- ---
- name: "(Setup: All NGINX) Upload NGINX Main Configuration File" - name: "(Setup: All NGINX) Upload NGINX Main Configuration File"
copy: copy:
src: "{{ main_push_location }}" src: "{{ nginx_main_push_location }}"
dest: /etc/nginx/nginx.conf dest: /etc/nginx/nginx.conf
backup: yes backup: yes
notify: "(Handler: All OSs) Reload NGINX" notify: "(Handler: All OSs) Reload NGINX"
@ -19,7 +19,7 @@
dest: /etc/nginx/conf.d/http dest: /etc/nginx/conf.d/http
backup: yes backup: yes
with_fileglob: with_fileglob:
- "{{ http_push_location }}" - "{{ nginx_http_push_location }}"
notify: "(Handler: All OSs) Reload NGINX" notify: "(Handler: All OSs) Reload NGINX"
when: nginx_http_push_enable when: nginx_http_push_enable
@ -35,6 +35,6 @@
dest: /etc/nginx/conf.d/stream dest: /etc/nginx/conf.d/stream
backup: yes backup: yes
with_fileglob: with_fileglob:
- "{{ stream_push_location }}" - "{{ nginx_stream_push_location }}"
notify: "(Handler: All OSs) Reload NGINX" notify: "(Handler: All OSs) Reload NGINX"
when: nginx_stream_push_enable when: nginx_stream_push_enable

View File

@ -1,19 +1,19 @@
--- ---
- name: "(Setup: NGINX Plus) Setup NGINX Plus API" - name: "(Setup: NGINX Plus) Setup NGINX Plus API"
blockinfile: 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 create: yes
block: | block: |
server { server {
listen 8080; listen 8080;
location /api { location /api {
{% if rest_api_write %} {% if nginx_rest_api_write %}
api write=on; api write=on;
{% else %} {% else %}
api; api;
{% endif %} {% endif %}
} }
{% if rest_api_dashboard %} {% if nginx_rest_api_dashboard %}
location = /dashboard.html { location = /dashboard.html {
root /usr/share/nginx/html; root /usr/share/nginx/html;
} }

View File

@ -1,7 +1,7 @@
--- ---
- name: "(Setup: NGINX Open Source) Enable NGINX Open Source Status" - name: "(Setup: NGINX Open Source) Enable NGINX Open Source Status"
blockinfile: 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 create: yes
block: | block: |
server { server {
@ -17,7 +17,7 @@
- name: "(Setup: NGINX Plus) Enable NGINX Plus Status" - name: "(Setup: NGINX Plus) Enable NGINX Plus Status"
blockinfile: 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 create: yes
block: | block: |
server { server {

View File

@ -26,13 +26,13 @@
lineinfile: lineinfile:
dest: /etc/controller-agent/agent.conf dest: /etc/controller-agent/agent.conf
regexp: api_key =.* 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" - name: "(Setup: All OSs) Configure NGINX Controller Agent API URL"
lineinfile: lineinfile:
dest: /etc/controller-agent/agent.conf dest: /etc/controller-agent/agent.conf
regexp: api_url =.* 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" - name: "(Setup: All OSs) Configure NGINX Controller Agent API Hostname"
lineinfile: lineinfile:

View File

@ -28,7 +28,7 @@
when: ansible_os_family == "FreeBSD" when: ansible_os_family == "FreeBSD"
notify: "(Handler: All OSs) Start NGINX" 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" - name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
package: package:

View File

@ -3,7 +3,7 @@
package: package:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
with_items: "{{ unit_modules }}" with_items: "{{ nginx_unit_modules }}"
when: ansible_os_family != "FreeBSD" when: ansible_os_family != "FreeBSD"
notify: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit" notify: "(Handler: Debian/Ubuntu/CentOS/RedHat) Start NGINX Unit"
@ -11,6 +11,6 @@
portinstall: portinstall:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
with_items: "{{ unit_modules }}" with_items: "{{ nginx_unit_modules }}"
when: ansible_os_family == "FreeBSD" when: ansible_os_family == "FreeBSD"
notify: "(Handler: FreeBSD) Start NGINX Unit" notify: "(Handler: FreeBSD) Start NGINX Unit"

View File

@ -1,6 +1,6 @@
server { server {
listen {{ http_template_listen }}; listen {{ nginx_http_template_listen }};
server_name {{ http_template_server_name }}; server_name {{ nginx_http_template_server_name }};
#charset koi8-r; #charset koi8-r;
#access_log /var/log/nginx/host.access.log main; #access_log /var/log/nginx/host.access.log main;

View File

@ -1,15 +1,15 @@
user {{ main_template_user }}; user {{ nginx_main_template_user }};
worker_processes {{ main_template_worker_processes }}; 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; pid /var/run/nginx.pid;
events { events {
worker_connections {{ main_template_worker_connections }}; worker_connections {{ nginx_main_template_worker_connections }};
} }
{% if http_template_enable %} {% if nginx_http_template_enable %}
http { http {
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
@ -23,7 +23,7 @@ http {
sendfile on; sendfile on;
#tcp_nopush on; #tcp_nopush on;
keepalive_timeout {{ http_template_keepalive_timeout }}; keepalive_timeout {{ nginx_http_template_keepalive_timeout }};
#gzip on; #gzip on;
@ -31,7 +31,7 @@ http {
} }
{% endif %} {% endif %}
{% if stream_template_enable %} {% if nginx_stream_template_enable %}
stream { stream {
include /etc/nginx/conf.d/stream/*.conf; include /etc/nginx/conf.d/stream/*.conf;
} }

View File

@ -1,3 +1,3 @@
server { server {
listen {{ stream_template_listen }}; listen {{ nginx_stream_template_listen }};
} }