docker modules: improve return value list documentation (#63145)

* Improve type documentation.

* Also improve return values.
pull/63429/head
Felix Fontein 5 years ago committed by ansibot
parent 6170f3a6f6
commit 7f643690c7

@ -328,6 +328,7 @@ services:
description: One or more commands to be executed in the container. description: One or more commands to be executed in the container.
returned: success returned: success
type: list type: list
elements: str
example: ["postgres"] example: ["postgres"]
image: image:
description: Name of the image from which the container was built. description: Name of the image from which the container was built.
@ -337,12 +338,13 @@ services:
labels: labels:
description: Meta data assigned to the container. description: Meta data assigned to the container.
returned: success returned: success
type: complex type: dict
example: {...} example: {...}
networks: networks:
description: Contains a dictionary for each network to which the container is a member. description: Contains a dictionary for each network to which the container is a member.
returned: success returned: success
type: complex type: list
elements: dict
contains: contains:
IPAddress: IPAddress:
description: The IP address assigned to the container. description: The IP address assigned to the container.
@ -358,6 +360,7 @@ services:
description: Aliases assigned to the container by the network. description: Aliases assigned to the container by the network.
returned: success returned: success
type: list type: list
elements: str
example: ['db'] example: ['db']
globalIPv6: globalIPv6:
description: IPv6 address assigned to the container. description: IPv6 address assigned to the container.
@ -373,6 +376,7 @@ services:
description: List of container names to which this container is linked. description: List of container names to which this container is linked.
returned: success returned: success
type: list type: list
elements: str
example: null example: null
macAddress: macAddress:
description: Mac Address assigned to the virtual NIC. description: Mac Address assigned to the virtual NIC.
@ -382,7 +386,7 @@ services:
state: state:
description: Information regarding the current disposition of the container. description: Information regarding the current disposition of the container.
returned: success returned: success
type: complex type: dict
contains: contains:
running: running:
description: Whether or not the container is up with a running process. description: Whether or not the container is up with a running process.
@ -436,6 +440,7 @@ actions:
description: A descriptive name of the action to be performed on the service's containers. description: A descriptive name of the action to be performed on the service's containers.
returned: always returned: always
type: list type: list
elements: str
contains: contains:
id: id:
description: the container's long ID description: the container's long ID

@ -155,6 +155,7 @@ volumes:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(volumes) is C(yes) returned: When I(volumes) is C(yes)
type: list type: list
elements: dict
networks: networks:
description: description:
- List of dict objects containing the basic information about each network. - List of dict objects containing the basic information about each network.
@ -162,6 +163,7 @@ networks:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(networks) is C(yes) returned: When I(networks) is C(yes)
type: list type: list
elements: dict
containers: containers:
description: description:
- List of dict objects containing the basic information about each container. - List of dict objects containing the basic information about each container.
@ -169,6 +171,7 @@ containers:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(containers) is C(yes) returned: When I(containers) is C(yes)
type: list type: list
elements: dict
images: images:
description: description:
- List of dict objects containing the basic information about each image. - List of dict objects containing the basic information about each image.
@ -176,6 +179,7 @@ images:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(images) is C(yes) returned: When I(images) is C(yes)
type: list type: list
elements: dict
disk_usage: disk_usage:
description: description:
- Information on summary disk usage by images, containers and volumes on docker host - Information on summary disk usage by images, containers and volumes on docker host

@ -79,6 +79,7 @@ images:
- The list only contains inspection results of images existing locally. - The list only contains inspection results of images existing locally.
returned: always returned: always
type: list type: list
elements: dict
sample: [ sample: [
{ {
"Architecture": "amd64", "Architecture": "amd64",

@ -86,6 +86,7 @@ nodes:
managers and nodes that are unreachable. managers and nodes that are unreachable.
returned: always returned: always
type: list type: list
elements: dict
''' '''
import traceback import traceback

@ -124,6 +124,7 @@ containers:
- List of IDs of deleted containers. - List of IDs of deleted containers.
returned: I(containers) is C(true) returned: I(containers) is C(true)
type: list type: list
elements: str
sample: '[]' sample: '[]'
containers_space_reclaimed: containers_space_reclaimed:
description: description:
@ -138,6 +139,7 @@ images:
- List of IDs of deleted images. - List of IDs of deleted images.
returned: I(images) is C(true) returned: I(images) is C(true)
type: list type: list
elements: str
sample: '[]' sample: '[]'
images_space_reclaimed: images_space_reclaimed:
description: description:
@ -152,6 +154,7 @@ networks:
- List of IDs of deleted networks. - List of IDs of deleted networks.
returned: I(networks) is C(true) returned: I(networks) is C(true)
type: list type: list
elements: str
sample: '[]' sample: '[]'
# volumes # volumes
@ -160,6 +163,7 @@ volumes:
- List of IDs of deleted volumes. - List of IDs of deleted volumes.
returned: I(volumes) is C(true) returned: I(volumes) is C(true)
type: list type: list
elements: str
sample: '[]' sample: '[]'
volumes_space_reclaimed: volumes_space_reclaimed:
description: description:

@ -236,12 +236,12 @@ RETURN = '''
swarm_facts: swarm_facts:
description: Informations about swarm. description: Informations about swarm.
returned: success returned: success
type: complex type: dict
contains: contains:
JoinTokens: JoinTokens:
description: Tokens to connect to the Swarm. description: Tokens to connect to the Swarm.
returned: success returned: success
type: complex type: dict
contains: contains:
Worker: Worker:
description: Token to create a new *worker* node description: Token to create a new *worker* node
@ -264,6 +264,7 @@ actions:
description: Provides the actions done on the swarm. description: Provides the actions done on the swarm.
returned: when action failed. returned: when action failed.
type: list type: list
elements: str
example: "['This cluster is already a swarm cluster']" example: "['This cluster is already a swarm cluster']"
''' '''

@ -175,6 +175,7 @@ nodes:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(nodes) is C(yes) returned: When I(nodes) is C(yes)
type: list type: list
elements: dict
services: services:
description: description:
- List of dict objects containing the basic information about each volume. - List of dict objects containing the basic information about each volume.
@ -182,6 +183,7 @@ services:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(services) is C(yes) returned: When I(services) is C(yes)
type: list type: list
elements: dict
tasks: tasks:
description: description:
- List of dict objects containing the basic information about each volume. - List of dict objects containing the basic information about each volume.
@ -189,6 +191,7 @@ tasks:
See description for I(verbose_output). See description for I(verbose_output).
returned: When I(tasks) is C(yes) returned: When I(tasks) is C(yes)
type: list type: list
elements: dict
''' '''

@ -901,6 +901,7 @@ changes:
description: description:
- List of changed service attributes if a service has been altered, [] otherwise. - List of changed service attributes if a service has been altered, [] otherwise.
type: list type: list
elements: str
sample: ['container_labels', 'replicas'] sample: ['container_labels', 'replicas']
rebuilt: rebuilt:
returned: always returned: always

Loading…
Cancel
Save