community.docker icon indicating copy to clipboard operation
community.docker copied to clipboard

Add support for `docker init --data-path-addr`

Open stmuraka opened this issue 2 years ago • 1 comments

The --data-path-addr parameter allows configuration for the Services to be exposed on a different interface as described here: https://docs.docker.com/engine/swarm/networking/#use-a-separate-interface-for-control-and-data-traffic. It is currently missing from the latest docker_swarm module https://docs.ansible.com/ansible/latest/collections/community/docker/docker_swarm_module.html#ansible-collections-community-docker-docker-swarm-module

The Docker SDK for Python supports the param in the init() and join() functions (as data_path_addr) and in the low-level APIs

init_swarm(advertise_addr=None, listen_addr='0.0.0.0:2377', force_new_cluster=False, swarm_spec=None, default_addr_pool=None, subnet_size=None, data_path_addr=None)
join_swarm(remote_addrs, join_token, listen_addr='0.0.0.0:2377', advertise_addr=None, data_path_addr=None)

stmuraka avatar Apr 19 '22 19:04 stmuraka

Same wish here, @stmuraka.

My PR might need some further fine tuning, but so far I got it working on my end (#344).

chrische avatar May 02 '22 19:05 chrische