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"
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

View File

@ -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;
}

View File

@ -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 {

View File

@ -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:

View File

@ -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:

View File

@ -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"

View File

@ -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;

View File

@ -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;
}

View File

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