Normalize booleans in docker_container docs. (#439) (#442)

(cherry picked from commit 1bf8da2390)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2022-08-10 18:16:50 +02:00 committed by GitHub
parent 855227c892
commit 81273a93f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ options:
description: description:
- Use with I(detach=false) to remove the container after successful execution. - Use with I(detach=false) to remove the container after successful execution.
type: bool type: bool
default: no default: false
command: command:
description: description:
- Command to execute when the container starts. A command may be either a string or a list. - Command to execute when the container starts. A command may be either a string or a list.
@ -69,7 +69,7 @@ options:
module options to decide whether the container should be recreated / updated module options to decide whether the container should be recreated / updated
or not. or not.
- Only options which correspond to the state of a container as handled by the - Only options which correspond to the state of a container as handled by the
Docker daemon can be specified, as well as C(networks). Docker daemon can be specified, as well as I(networks).
- Must be a dictionary specifying for an option one of the keys C(strict), C(ignore) - Must be a dictionary specifying for an option one of the keys C(strict), C(ignore)
and C(allow_more_present). and C(allow_more_present).
- If C(strict) is specified, values are tested for equality, and changes always - If C(strict) is specified, values are tested for equality, and changes always
@ -177,7 +177,7 @@ options:
description: description:
- Device path in the container. - Device path in the container.
type: str type: str
required: yes required: true
rate: rate:
description: description:
- "Device read limit in format C(<number>[<unit>])." - "Device read limit in format C(<number>[<unit>])."
@ -185,7 +185,7 @@ options:
C(T) (tebibyte), or C(P) (pebibyte)." C(T) (tebibyte), or C(P) (pebibyte)."
- "Omitting the unit defaults to bytes." - "Omitting the unit defaults to bytes."
type: str type: str
required: yes required: true
device_write_bps: device_write_bps:
description: description:
- "List of device and write rate (bytes per second) to device." - "List of device and write rate (bytes per second) to device."
@ -196,7 +196,7 @@ options:
description: description:
- Device path in the container. - Device path in the container.
type: str type: str
required: yes required: true
rate: rate:
description: description:
- "Device read limit in format C(<number>[<unit>])." - "Device read limit in format C(<number>[<unit>])."
@ -204,7 +204,7 @@ options:
C(T) (tebibyte), or C(P) (pebibyte)." C(T) (tebibyte), or C(P) (pebibyte)."
- "Omitting the unit defaults to bytes." - "Omitting the unit defaults to bytes."
type: str type: str
required: yes required: true
device_read_iops: device_read_iops:
description: description:
- "List of device and read rate (IO per second) from device." - "List of device and read rate (IO per second) from device."
@ -215,13 +215,13 @@ options:
description: description:
- Device path in the container. - Device path in the container.
type: str type: str
required: yes required: true
rate: rate:
description: description:
- "Device read limit." - "Device read limit."
- "Must be a positive integer." - "Must be a positive integer."
type: int type: int
required: yes required: true
device_write_iops: device_write_iops:
description: description:
- "List of device and write rate (IO per second) to device." - "List of device and write rate (IO per second) to device."
@ -232,13 +232,13 @@ options:
description: description:
- Device path in the container. - Device path in the container.
type: str type: str
required: yes required: true
rate: rate:
description: description:
- "Device read limit." - "Device read limit."
- "Must be a positive integer." - "Must be a positive integer."
type: int type: int
required: yes required: true
device_requests: device_requests:
description: description:
- Allows to request additional resources, such as GPUs. - Allows to request additional resources, such as GPUs.
@ -331,7 +331,7 @@ options:
description: description:
- Use the kill command when stopping a running container. - Use the kill command when stopping a running container.
type: bool type: bool
default: no default: false
aliases: aliases:
- forcekill - forcekill
groups: groups:
@ -382,11 +382,11 @@ options:
- When I(state) is C(present) or C(started), the module compares the configuration of an existing - When I(state) is C(present) or C(started), the module compares the configuration of an existing
container to requested configuration. The evaluation includes the image version. If the image container to requested configuration. The evaluation includes the image version. If the image
version in the registry does not match the container, the container will be recreated. You can version in the registry does not match the container, the container will be recreated. You can
stop this behavior by setting I(ignore_image) to C(True). stop this behavior by setting I(ignore_image) to C(true).
- "B(Warning:) This option is ignored if C(image: ignore) or C(*: ignore) is specified in the - "B(Warning:) This option is ignored if C(image: ignore) or C(*: ignore) is specified in the
I(comparisons) option." I(comparisons) option."
type: bool type: bool
default: no default: false
image: image:
description: description:
- Repository path and tag used to create the container. If an image is not found or pull is true, the image - Repository path and tag used to create the container. If an image is not found or pull is true, the image
@ -431,7 +431,7 @@ options:
description: description:
- Retain anonymous volumes associated with a removed container. - Retain anonymous volumes associated with a removed container.
type: bool type: bool
default: yes default: true
kill_signal: kill_signal:
description: description:
- Override default signal used to kill a running container. - Override default signal used to kill a running container.
@ -586,7 +586,7 @@ options:
- Assign a name to a new container or match an existing container. - Assign a name to a new container or match an existing container.
- When identifying an existing container name may be a name or a long or short container ID. - When identifying an existing container name may be a name or a long or short container ID.
type: str type: str
required: yes required: true
network_mode: network_mode:
description: description:
- Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:<name|id>), C(<network_name>) or C(default). - Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:<name|id>), C(<network_name>) or C(default).
@ -614,7 +614,7 @@ options:
description: description:
- The network's name. - The network's name.
type: str type: str
required: yes required: true
ipv4_address: ipv4_address:
description: description:
- The container's IPv4 address in this network. - The container's IPv4 address in this network.
@ -636,15 +636,15 @@ options:
elements: str elements: str
networks_cli_compatible: networks_cli_compatible:
description: description:
- "If I(networks_cli_compatible) is set to C(yes) (default), this module will behave as - "If I(networks_cli_compatible) is set to C(true) (default), this module will behave as
C(docker run --network) and will B(not) add the default network if I(networks) is C(docker run --network) and will B(not) add the default network if I(networks) is
specified. If I(networks) is not specified, the default network will be attached." specified. If I(networks) is not specified, the default network will be attached."
- "When I(networks_cli_compatible) is set to C(no) and networks are provided to the module - "When I(networks_cli_compatible) is set to C(false) and networks are provided to the module
via the I(networks) option, the module behaves differently than C(docker run --network): via the I(networks) option, the module behaves differently than C(docker run --network):
C(docker run --network other) will create a container with network C(other) attached, C(docker run --network other) will create a container with network C(other) attached,
but the default network not attached. This module with I(networks: {name: other}) will but the default network not attached. This module with I(networks: {name: other}) will
create a container with both C(default) and C(other) attached. If I(purge_networks) is create a container with both C(default) and C(other) attached. If I(purge_networks) is
set to C(yes), the C(default) network will be removed afterwards." set to C(true), the C(default) network will be removed afterwards."
type: bool type: bool
default: true default: true
oom_killer: oom_killer:
@ -661,7 +661,7 @@ options:
- If set to true, output of the container command will be printed. - If set to true, output of the container command will be printed.
- Only effective when I(log_driver) is set to C(json-file), C(journald), or C(local). - Only effective when I(log_driver) is set to C(json-file), C(journald), or C(local).
type: bool type: bool
default: no default: false
paused: paused:
description: description:
- Use with the started state to pause running processes inside the container. - Use with the started state to pause running processes inside the container.
@ -722,13 +722,13 @@ options:
- "B(Note:) images are only pulled when specified by name. If the image is specified - "B(Note:) images are only pulled when specified by name. If the image is specified
as a image ID (hash), it cannot be pulled." as a image ID (hash), it cannot be pulled."
type: bool type: bool
default: no default: false
purge_networks: purge_networks:
description: description:
- Remove the container from ALL networks not included in I(networks) parameter. - Remove the container from ALL networks not included in I(networks) parameter.
- Any default networks such as C(bridge), if not found in I(networks), will be removed as well. - Any default networks such as C(bridge), if not found in I(networks), will be removed as well.
type: bool type: bool
default: no default: false
read_only: read_only:
description: description:
- Mount the container's root file system as read-only. - Mount the container's root file system as read-only.
@ -738,7 +738,7 @@ options:
description: description:
- Use with present and started states to force the re-creation of an existing container. - Use with present and started states to force the re-creation of an existing container.
type: bool type: bool
default: no default: false
removal_wait_timeout: removal_wait_timeout:
description: description:
- When removing an existing container, the docker daemon API call exists after the container - When removing an existing container, the docker daemon API call exists after the container
@ -753,7 +753,7 @@ options:
description: description:
- Use with started state to force a matching container to be stopped and restarted. - Use with started state to force a matching container to be stopped and restarted.
type: bool type: bool
default: no default: false
restart_policy: restart_policy:
description: description:
- Container restart policy. - Container restart policy.
@ -917,7 +917,7 @@ EXAMPLES = '''
image: redis image: redis
command: redis-server --appendonly yes command: redis-server --appendonly yes
state: present state: present
recreate: yes recreate: true
exposed_ports: exposed_ports:
- 6379 - 6379
volumes_from: volumes_from:
@ -928,7 +928,7 @@ EXAMPLES = '''
name: myapplication name: myapplication
image: someuser/appimage image: someuser/appimage
state: started state: started
restart: yes restart: true
links: links:
- "myredis:aliasedredis" - "myredis:aliasedredis"
devices: devices:
@ -965,7 +965,7 @@ EXAMPLES = '''
- name: Start 4 load-balanced containers - name: Start 4 load-balanced containers
community.docker.docker_container: community.docker.docker_container:
name: "container{{ item }}" name: "container{{ item }}"
recreate: yes recreate: true
image: someuser/anotherappimage image: someuser/anotherappimage
command: sleep 1d command: sleep 1d
with_sequence: count=4 with_sequence: count=4
@ -1038,12 +1038,12 @@ EXAMPLES = '''
name: sleepy name: sleepy
networks: networks:
- name: TestingNet2 - name: TestingNet2
purge_networks: yes purge_networks: true
- name: Remove container from all networks - name: Remove container from all networks
community.docker.docker_container: community.docker.docker_container:
name: sleepy name: sleepy
purge_networks: yes purge_networks: true
- name: Start a container and use an env file - name: Start a container and use an env file
community.docker.docker_container: community.docker.docker_container: