Allow omission of 'port' and 'check' from server params
useful for services that require more than 1 port mapped through (eg passive ftp)
This commit is contained in:
parent
ff4a06b5b0
commit
b707857692
2 changed files with 6 additions and 2 deletions
|
@ -308,7 +308,7 @@ listen {{ listener.get('name', listener_name) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if 'servers' in listener %}
|
{%- if 'servers' in listener %}
|
||||||
{%- for server_name, server in listener.servers|dictsort %}
|
{%- for server_name, server in listener.servers|dictsort %}
|
||||||
server {{ server.get('name', server_name) }} {{ server.host }}:{{ server.port }} {{ server.check }} {{ server.get('extra', '') }}
|
server {{ server.get('name', server_name) }} {{ server.host }}{% if 'port' in server %}:{{ server.port }}{% endif %} {{ server.get('check', '') }} {{ server.get('extra', '') }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -502,7 +502,7 @@ backend {{ backend.get('name', backend_name) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if 'servers' in backend %}
|
{%- if 'servers' in backend %}
|
||||||
{%- for server_name, server in backend.servers|dictsort %}
|
{%- for server_name, server in backend.servers|dictsort %}
|
||||||
server {{ server.get('name', server_name) }} {{ server.host }}:{{ server.port }} {{ server.check }} {{ server.get('extra', '') }}
|
server {{ server.get('name', server_name) }} {{ server.host }}{% if 'port' in server %}:{{ server.port }}{% endif %} {{ server.get('check', '') }} {{ server.get('extra', '') }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -103,6 +103,8 @@ haproxy:
|
||||||
host: web2.example.com
|
host: web2.example.com
|
||||||
port: 18888
|
port: 18888
|
||||||
check: check
|
check: check
|
||||||
|
web3:
|
||||||
|
host: web3.example.com
|
||||||
|
|
||||||
frontends:
|
frontends:
|
||||||
frontend1:
|
frontend1:
|
||||||
|
@ -163,6 +165,8 @@ haproxy:
|
||||||
host: 123.156.189.111
|
host: 123.156.189.111
|
||||||
port: 8080
|
port: 8080
|
||||||
check: check
|
check: check
|
||||||
|
another-server:
|
||||||
|
host: 123.156.189.112
|
||||||
api-backend:
|
api-backend:
|
||||||
options:
|
options:
|
||||||
- http-server-close
|
- http-server-close
|
||||||
|
|
Loading…
Reference in a new issue