+ {%- if balanced_controller %}
+ {%- set balancer_ip = salt['cmd.run']("getent hosts __BALANCER_NODENAME__ | awk '{print $1 ; exit}'", python_shell=True) %}
+ {%- set prometheus_ip = salt['cmd.run']("getent hosts __PROMETHEUS_NODENAME__ | awk '{print $1 ; exit}'", python_shell=True) %}
+ - index: index.html index.htm
+ - location /:
+ - allow: {{ balancer_ip }}
+ - allow: {{ prometheus_ip }}
+ - deny: all
+ - proxy_pass: 'http://controller_upstream'
+ - proxy_read_timeout: 300
+ - proxy_connect_timeout: 90
+ - proxy_redirect: 'off'
+ - proxy_max_temp_file_size: 0
+ - proxy_request_buffering: 'off'
+ - proxy_buffering: 'off'
+ - proxy_http_version: '1.1'
+ - access_log: /var/log/nginx/{{ server_name }}.access.log combined
+ - error_log: /var/log/nginx/{{ server_name }}.error.log
+ - client_max_body_size: 128m
+ {%- else %}