Merge "Enable HAProxy Stats Web UI"

This commit is contained in:
Jenkins 2015-08-25 16:15:45 +00:00 committed by Gerrit Code Review
commit fb61e3e176
4 changed files with 25 additions and 3 deletions

View File

@ -85,3 +85,6 @@ swift_dispersion_password:
### Once the swift cluster has been setup DO NOT change these hash values!
swift_hash_path_suffix:
swift_hash_path_prefix:
## haproxy stats password
haproxy_stats_password:

View File

@ -43,6 +43,13 @@ haproxy_rise: 3
haproxy_fall: 3
haproxy_interval: 12000
## Haproxy Stats
haproxy_stats_enabled: False
haproxy_stats_bind_address: 127.0.0.1
haproxy_stats_port: 1936
haproxy_username: admin
haproxy_stats_password: secrete
# Default haproxy backup nodes to empty list so this doesn't have to be
# defined for each service.
haproxy_backup_nodes: []

View File

@ -14,11 +14,11 @@
# limitations under the License.
- name: Drop base haproxy config
copy:
template:
src: "{{ item }}"
dest: "/etc/haproxy/{{ item }}"
dest: "/etc/haproxy/haproxy.cfg"
with_items:
- haproxy.cfg
- haproxy.cfg.j2
notify: Restart haproxy
tags:
- haproxy-base-config

View File

@ -1,3 +1,5 @@
# {{ ansible_managed }}
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
@ -18,3 +20,13 @@ defaults
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 auth {{ haproxy_username }}:{{ haproxy_stats_password }}
{% endif %}