Skip to content

Commit

Permalink
Add notes on docker_network connectivity for containers and services. (
Browse files Browse the repository at this point in the history
…ansible#65840) (ansible#65965)

(cherry picked from commit d3b6db3)
  • Loading branch information
felixfontein authored and acozine committed Jan 2, 2020
1 parent c290ea1 commit 588cc83
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/ansible/modules/cloud/docker/docker_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
connected:
description:
- List of container names or container IDs to connect to a network.
- Please note that the module only makes sure that these containers are connected to the network,
but does not care about connection options. If you rely on specific IP addresses etc., use the
M(docker_container) module to ensure your containers are correctly connected to this network.
type: list
aliases:
- containers
Expand Down Expand Up @@ -183,6 +186,15 @@
- docker
- docker.docker_py_1_documentation
notes:
- When network options are changed, the module disconnects all containers from the network, deletes the network, and re-creates the network.
It does not try to reconnect containers, except the ones listed in (I(connected), and even for these, it does not consider specific
connection options like fixed IP addresses or MAC addresses. If you need more control over how the containers are connected to the
network, loop the M(docker_container) module to loop over your containers to make sure they are connected properly.
- The module does not support Docker Swarm, i.e. it will not try to disconnect or reconnect services. If services are connected to the
network, deleting the network will fail. When network options are changed, the network has to be deleted and recreated, so this will
fail as well.
author:
- "Ben Keith (@keitwb)"
- "Chris Houseknecht (@chouseknecht)"
Expand Down

0 comments on commit 588cc83

Please sign in to comment.