From 27366f4926d951a467670a1fd47fbd10f77db55d Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 23:06:19 +0100 Subject: [PATCH] docker_network: adjust documentation to reality for state=absent + force=true. (#1016) (#1017) (cherry picked from commit d17ee667ce95ff889d69691acdfbc9245db633ba) Co-authored-by: Felix Fontein --- plugins/modules/docker_network.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/modules/docker_network.py b/plugins/modules/docker_network.py index 00b79cd2..ef061f03 100644 --- a/plugins/modules/docker_network.py +++ b/plugins/modules/docker_network.py @@ -73,9 +73,7 @@ options: force: description: - - With state V(absent) forces disconnecting all containers from the - network prior to deleting the network. With state V(present) will - disconnect all containers, delete the network and re-create the + - With state V(present) will disconnect all containers for existing networks, delete the network and re-create the network. - This option is required if you have changed the IPAM or driver options and want an existing network to be updated to use the new options. @@ -133,9 +131,8 @@ options: state: description: - - V(absent) deletes the network. If a network has connected containers, it - cannot be deleted. Use the O(force) option to disconnect all containers - and delete the network. + - V(absent) deletes the network. If a network has connected containers, these will be + detached from the network. - V(present) creates the network, if it does not already exist with the specified parameters, and connects the list of containers provided via the connected parameter. Containers not on the list will be disconnected. @@ -259,7 +256,6 @@ EXAMPLES = ''' community.docker.docker_network: name: network_one state: absent - force: true ''' RETURN = '''