Bind to v4 and v6 in haproxy

Also, add a newline between listener stanzas in the config for
readability.

Change-Id: I599ca06f933e746fae3769e7872ae9911c4b00ed
This commit is contained in:
James E. Blair 2019-04-18 15:38:15 -07:00
parent 6747cf236b
commit 65563f226e
3 changed files with 5 additions and 4 deletions

View File

@ -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'

View File

@ -31,4 +31,5 @@ listen {{ listener.name }}
{% for server in listener.servers %}
server {{ server.name }} {{ server.address }}
{% endfor %}
{% endfor %}

View File

@ -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"