openstack-ansible/playbooks/roles/haproxy_server/templates/haproxy.cfg.j2
Marc Gariepy a2c1d8ca2c Fix configuration string for haproxy
Use user and group configuration option, uid and gid need a number
instead of a name. Specifying a name for uid/gid attributes will make
haproxy run under the root user.

Change-Id: I1d6db661b7d0958e1ba888770e3ce789d7cb4a76
2016-04-11 10:13:04 -04:00

37 lines
962 B
Django/Jinja

# {{ ansible_managed }}
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
maxconn 4096
tune.bufsize 384000
stats socket /var/run/haproxy.stat level admin mode 600
{% if haproxy_ssl | bool %}tune.ssl.default-dh-param {{haproxy_ssl_dh_param}}{% endif %}
defaults
log global
option dontlognull
option redispatch
retries 3
timeout client 50s
timeout connect 10s
timeout server 50s
maxconn 4096
{% if haproxy_stats_enabled | bool %}
listen stats {{ haproxy_stats_bind_address }}:{{ haproxy_stats_port }}
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats show-node
stats show-legends
stats auth {{ haproxy_username }}:{{ haproxy_stats_password }}
stats admin if TRUE
{% endif %}