The externall network cannot be attached from inside the compose file
This commit is contained in:
parent
84afd8650e
commit
bfc7330703
|
@ -31,5 +31,10 @@
|
|||
- '{{ haproxy_docker_compose_dir }}/docker-haproxy-stack.yml'
|
||||
run_once: True
|
||||
|
||||
- name: Connect haproxy to the external network
|
||||
command: docker service update --network-add {{ haproxy_docker_overlay_network }} haproxy_haproxy --update-delay 30s --update-parallelism 1
|
||||
run_once: True
|
||||
ignore_errors: True
|
||||
|
||||
when: docker_swarm_manager_main_node is defined and docker_swarm_manager_main_node | bool
|
||||
tags: [ 'haproxy', 'docker_haproxy', 'docker_swarm', 'docker' ]
|
||||
|
|
|
@ -7,8 +7,6 @@ services:
|
|||
- {{ haproxy_cert_dir }}:{{ haproxy_cert_dir }}:ro
|
||||
- /etc/haproxy:/usr/local/etc/haproxy:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks:
|
||||
- {{ haproxy_docker_overlay_network }}
|
||||
ports:
|
||||
- target: {{ haproxy_default_port }}
|
||||
published: {{ haproxy_default_port }}
|
||||
|
|
Loading…
Reference in New Issue