Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_network: adjust documentation to reality for state=absent + force=true #1016

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions plugins/modules/docker_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@

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.
Expand Down Expand Up @@ -139,9 +137,8 @@

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.
Expand Down Expand Up @@ -265,7 +262,6 @@
community.docker.docker_network:
name: network_one
state: absent
force: true
'''

RETURN = '''
Expand Down
Loading