2019-02-06 13:39:48 +01:00
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
become: true
|
|
|
|
remote_user: root
|
|
|
|
roles:
|
|
|
|
- ansible-role-nginx
|
|
|
|
vars:
|
2019-02-15 15:51:09 +01:00
|
|
|
nginx_debug_output: true
|
2019-02-06 13:39:48 +01:00
|
|
|
nginx_main_template_enable: true
|
|
|
|
nginx_main_template:
|
|
|
|
template_file: nginx.conf.j2
|
|
|
|
conf_file_name: nginx.conf
|
|
|
|
conf_file_location: /etc/nginx/
|
|
|
|
user: nginx
|
|
|
|
worker_processes: auto
|
|
|
|
error_level: warn
|
|
|
|
worker_connections: 1024
|
|
|
|
http_enable: false
|
|
|
|
http_settings:
|
|
|
|
keepalive_timeout: 65
|
|
|
|
cache: false
|
|
|
|
rate_limit: false
|
|
|
|
keyval: false
|
|
|
|
stream_enable: true
|
|
|
|
http_global_autoindex: false
|
|
|
|
nginx_stream_template_enable: true
|
|
|
|
nginx_stream_template:
|
|
|
|
default:
|
|
|
|
template_file: stream/default.conf.j2
|
|
|
|
conf_file_name: default.conf
|
|
|
|
conf_file_location: /etc/nginx/conf.d/stream
|
|
|
|
network_streams:
|
|
|
|
app:
|
|
|
|
listen_address: localhost
|
|
|
|
listen_port: 80
|
|
|
|
udp_enable: false
|
|
|
|
proxy_pass: backend
|
|
|
|
proxy_timeout: 3s
|
|
|
|
proxy_connect_timeout: 1s
|
|
|
|
proxy_protocol: false
|
|
|
|
health_check_plus: false
|
|
|
|
upstreams:
|
|
|
|
backend_upstream:
|
|
|
|
name: backend
|
|
|
|
lb_method: least_conn
|
|
|
|
zone_name: backend
|
|
|
|
zone_size: 64k
|
|
|
|
sticky_cookie: false
|
|
|
|
servers:
|
|
|
|
backend_server_1:
|
|
|
|
address: localhost
|
|
|
|
port: 8080
|
|
|
|
weight: 1
|
|
|
|
health_check: max_fails=1 fail_timeout=10s
|