From 9408d2792ed6a811ec4d4cb3e7fb1a639b26adfd Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Fri, 11 Mar 2016 13:55:58 +0100 Subject: [PATCH] Support multiple IPs for SSL in HaProxy --- tasks/configure.yml | 2 +- templates/haproxy_cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index dd4d792..03cb7f3 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -2,7 +2,7 @@ # file: roles/haproxy/tasks/configure.yml - name: "Proxy | Install SSL certificates" - copy: src={{inventory_dir}}/files/ssl/{{item}} + copy: src={{inventory_dir}}/files/ssl/{{item.file}} dest=/etc/haproxy/certs with_items: '{{ proxy_certificates }}' notify: 'Proxy | Restart HAProxy' diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg index 8a8e1ab..ddb0799 100644 --- a/templates/haproxy_cfg +++ b/templates/haproxy_cfg @@ -64,7 +64,7 @@ frontend http-in {% for cert in proxy_certificates %} frontend https-in - bind :443 ssl crt /etc/haproxy/certs/{{ cert }} no-sslv3 + bind {{ cert.ip }}:443 ssl crt /etc/haproxy/certs/{{ cert.file }} no-sslv3 acl blockedip src -i -f /etc/haproxy/blacklist http-request deny if blockedip {% for host in groups['all'] %} -- GitLab