docker_container: pass networks to Daemon on container creation (#933)

* Pass networks to Daemon on container creation.

* Restore old behavior, and only provide all networks on creation for API 1.44+.
This commit is contained in:
Felix Fontein
2024-07-23 17:34:26 +02:00
committed by GitHub
parent 11ce793f7d
commit 2ddadf1e2b
5 changed files with 50 additions and 6 deletions
@@ -0,0 +1,12 @@
minor_changes:
- "docker_container - when creating a container, directly pass all networks to connect to to the Docker Daemon
for API version 1.44 and newer. This makes creation more efficient and works around a bug in Docker Daemon that
does not use the specified MAC address in at least some cases, though only for creation
(https://github.com/ansible-collections/community.docker/pull/933)."
bugfixes:
- "docker_container - restore behavior of the module from community.docker 2.x.y that passes the first network
to the Docker Deamon while creating the container (https://github.com/ansible-collections/community.docker/pull/933)."
known_issues:
- "docker_container - when specifying a MAC address for a container's network, and the network is attached
after container creation (for example, due to idempotency checks), the MAC address is at least in some
cases ignored by the Docker Daemon (https://github.com/ansible-collections/community.docker/pull/933)."