Missing newlines in the haproxy template. Do not use variables as task parameters.
This commit is contained in:
parent
cbb5370aa5
commit
54b12892b7
|
@ -10,19 +10,19 @@
|
||||||
|
|
||||||
- name: Connect haproxy to the overlay networks
|
- name: Connect haproxy to the overlay networks
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_name: '{{ docker_haproxy_service_name }}'
|
project_name: haproxy_haproxy
|
||||||
definition:
|
definition:
|
||||||
services:
|
services:
|
||||||
'{{ docker_haproxy_service_name }}':
|
haproxy_haproxy:
|
||||||
networks: '{{ docker_swarm_haproxy_networks }}'
|
networks: '{{ docker_swarm_haproxy_networks }}'
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: Connect haproxy to the overlay networks
|
- name: Connect haproxy to the overlay networks
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_name: '{{ docker_haproxy_service_name }}'
|
project_name: haproxy_haproxy
|
||||||
definition:
|
definition:
|
||||||
services:
|
services:
|
||||||
'{{ docker_haproxy_service_name }}':
|
haproxy_haproxy:
|
||||||
networks: '{{ docker_swarm_haproxy_additional_networks }}'
|
networks: '{{ docker_swarm_haproxy_additional_networks }}'
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
|
|
|
@ -73,10 +73,12 @@ listen local_stats
|
||||||
|
|
||||||
frontend http
|
frontend http
|
||||||
bind *:{{ https_port }} ssl crt {{ haproxy_cert_dir }} alpn h2,http/1.1 {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
|
bind *:{{ https_port }} ssl crt {{ haproxy_cert_dir }} alpn h2,http/1.1 {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
|
||||||
|
|
||||||
bind *:{{ haproxy_default_port }} {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
|
bind *:{{ haproxy_default_port }} {% if docker_swarm_haproxy_installation_type == 'global' %}accept-proxy{% endif %}
|
||||||
|
|
||||||
mode http
|
mode http
|
||||||
option httplog
|
|
||||||
option http-keep-alive
|
option http-keep-alive
|
||||||
|
redirect scheme https code 301 if !{ ssl_fc }
|
||||||
http-request add-header X-Forwarded-Proto https
|
http-request add-header X-Forwarded-Proto https
|
||||||
# HSTS (63072000 seconds)
|
# HSTS (63072000 seconds)
|
||||||
http-response set-header Strict-Transport-Security max-age=63072000
|
http-response set-header Strict-Transport-Security max-age=63072000
|
||||||
|
@ -100,7 +102,6 @@ frontend http
|
||||||
{% endif %}
|
{% endif %}
|
||||||
use_backend {{ srv.acl_name }}_bck if {{ srv.acl_name }}
|
use_backend {{ srv.acl_name }}_bck if {{ srv.acl_name }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
redirect scheme https code 301 if !{ ssl_fc }
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Backends
|
# Backends
|
||||||
|
@ -110,7 +111,6 @@ frontend http
|
||||||
# swarm API
|
# swarm API
|
||||||
backend swarm_api_bck
|
backend swarm_api_bck
|
||||||
mode http
|
mode http
|
||||||
option httplog
|
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
server swarm 127.0.0.1:{{ docker_api_port }}
|
server swarm 127.0.0.1:{{ docker_api_port }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -118,7 +118,6 @@ backend swarm_api_bck
|
||||||
{% if docker_swarm_cluster_portainer_install %}
|
{% if docker_swarm_cluster_portainer_install %}
|
||||||
backend portainer_bck
|
backend portainer_bck
|
||||||
mode http
|
mode http
|
||||||
option httplog
|
|
||||||
option httpchk
|
option httpchk
|
||||||
http-check send meth HEAD uri / ver HTTP/1.1 hdr Host localhost
|
http-check send meth HEAD uri / ver HTTP/1.1 hdr Host localhost
|
||||||
http-check expect rstatus (2|3)[0-9][0-9]
|
http-check expect rstatus (2|3)[0-9][0-9]
|
||||||
|
|
Loading…
Reference in New Issue