2020-10-01 17:38:36 +02:00
|
|
|
---
|
|
|
|
- name: Create the networks that haproxy will attach to
|
|
|
|
block:
|
|
|
|
- name: Create the overlay networks
|
|
|
|
docker_network:
|
|
|
|
name: '{{ item }}'
|
|
|
|
driver: overlay
|
|
|
|
with_items: '{{ docker_swarm_haproxy_networks }}'
|
|
|
|
|
|
|
|
- name: Connect haproxy to the overlay networks
|
|
|
|
docker_network:
|
|
|
|
name: '{{ item }}'
|
|
|
|
connected:
|
|
|
|
- 'haproxy_haproxy'
|
2020-10-01 17:53:46 +02:00
|
|
|
appends: yes
|
2020-10-01 17:48:01 +02:00
|
|
|
with_items: '{{ docker_swarm_haproxy_networks }}'
|
2020-10-01 17:38:36 +02:00
|
|
|
|
|
|
|
when: docker_swarm_manager_main_node | bool
|
|
|
|
tags: [ 'haproxy', 'docker_haproxy', 'docker_swarm', 'docker', 'docker_network' ]
|