From ae308571440c4d803dce7cf24afe48d51872ed42 Mon Sep 17 00:00:00 2001
From: Sam Yaple <sam@yaple.net>
Date: Sun, 27 Sep 2015 08:52:21 +0000
Subject: [PATCH] bind haproxy to single interface

Change-Id: I0c9d85ec7da98d32b94d1e61538fe20333536d39
Closes-Bug: #1500159
---
 ansible/roles/haproxy/templates/haproxy.cfg.j2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2
index da43239da2..637cb1ce1d 100644
--- a/ansible/roles/haproxy/templates/haproxy.cfg.j2
+++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2
@@ -14,7 +14,7 @@ defaults
   timeout server 1m
   timeout check 10s
 
-listen stats :{{ haproxy_stats_port }}
+listen stats {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ haproxy_stats_port }}
    mode http
    stats enable
    stats uri /