From 65563f226e6294bafdad4b73bc0fed65a40be78b Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 18 Apr 2019 15:38:15 -0700 Subject: [PATCH] Bind to v4 and v6 in haproxy Also, add a newline between listener stanzas in the config for readability. Change-Id: I599ca06f933e746fae3769e7872ae9911c4b00ed --- playbooks/group_vars/gitea-lb.yaml | 4 ++-- playbooks/roles/haproxy/templates/haproxy.cfg.j2 | 1 + playbooks/zuul/templates/group_vars/gitea-lb.yaml.j2 | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/playbooks/group_vars/gitea-lb.yaml b/playbooks/group_vars/gitea-lb.yaml index 2d6bc2745e..16497d2a3c 100644 --- a/playbooks/group_vars/gitea-lb.yaml +++ b/playbooks/group_vars/gitea-lb.yaml @@ -1,7 +1,7 @@ haproxy_listeners: - name: balance_git_http bind: - - '*:80' + - ':::80' servers: - name: 'gitea01.opendev.org' address: '38.108.68.93:3080' @@ -21,7 +21,7 @@ haproxy_listeners: address: '38.108.68.22:3080' - name: balance_git_https bind: - - '*:443' + - ':::443' servers: - name: 'gitea01.opendev.org' address: '38.108.68.93:3000' diff --git a/playbooks/roles/haproxy/templates/haproxy.cfg.j2 b/playbooks/roles/haproxy/templates/haproxy.cfg.j2 index 5715383b15..8e217e5c63 100644 --- a/playbooks/roles/haproxy/templates/haproxy.cfg.j2 +++ b/playbooks/roles/haproxy/templates/haproxy.cfg.j2 @@ -31,4 +31,5 @@ listen {{ listener.name }} {% for server in listener.servers %} server {{ server.name }} {{ server.address }} {% endfor %} + {% endfor %} diff --git a/playbooks/zuul/templates/group_vars/gitea-lb.yaml.j2 b/playbooks/zuul/templates/group_vars/gitea-lb.yaml.j2 index 5841b9a57d..0dbfaab7aa 100644 --- a/playbooks/zuul/templates/group_vars/gitea-lb.yaml.j2 +++ b/playbooks/zuul/templates/group_vars/gitea-lb.yaml.j2 @@ -1,13 +1,13 @@ haproxy_listeners: - name: balance_git_http bind: - - "*:80" + - ":::80" servers: - name: "gitea01.opendev.org" address: "{{ (hostvars['gitea01.opendev.org'] | default({})).get('nodepool', {}).get('public_ipv4', '') }}:3080" - name: balance_git_https bind: - - "*:443" + - ":::443" servers: - name: "gitea01.opendev.org" address: "{{ (hostvars['gitea01.opendev.org'] | default({})).get('nodepool', {}).get('public_ipv4', '') }}:3000"