From b2b2e8cbdb6dd5b85b8b6773020d5bbafa811c75 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Fri, 6 May 2016 15:54:47 +0200
Subject: [PATCH] Bug fix

---
 templates/haproxy_cfg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg
index e905809..905f757 100644
--- a/templates/haproxy_cfg
+++ b/templates/haproxy_cfg
@@ -141,14 +141,14 @@ backend backend_{{ external.key }}
 {% for host in groups['all'] %}
 
 backend backend_{{host}}
-{% if host == inventory_hostname %}
+{% if host == inventory_hostname or host == 'localhost' %}
   http-response deny
 {% else %}
   server server_{{host}} {{hostvars[host]['static_ipv4']|default(hostvars[host]['ansible_default_ipv4']['address'])}}:80 maxconn 100
 {% endif %}
 
 backend backend_{{host}}_https
-{% if host == inventory_hostname %}
+{% if host == inventory_hostname or host == 'localhost' %}
   http-response deny
 {% else %}
   http-response set-header Strict-Transport-Security "max-age=16000000; includeSubDomains; preload;"
-- 
GitLab