From bc6757d3b8c6f20b4625ae9dce6c924094e7c2ec Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Thu, 4 Aug 2022 14:23:52 +0200 Subject: [PATCH] Fix docs. (#436) --- plugins/modules/docker_network_info.py | 4 ++-- plugins/modules/docker_prune.py | 16 ++++++++-------- plugins/modules/docker_stack_info.py | 5 +++-- plugins/modules/docker_swarm.py | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/plugins/modules/docker_network_info.py b/plugins/modules/docker_network_info.py index 7375cba4..f7d7122f 100644 --- a/plugins/modules/docker_network_info.py +++ b/plugins/modules/docker_network_info.py @@ -67,7 +67,7 @@ network: - Will be C(none) if network does not exist. returned: always type: dict - sample: '{ + sample: { "Attachable": false, "ConfigFrom": { "Network": "" @@ -94,7 +94,7 @@ network: "Name": "ansible-test-f2700bba", "Options": {}, "Scope": "local" - }' + } ''' import traceback diff --git a/plugins/modules/docker_prune.py b/plugins/modules/docker_prune.py index 798fe443..8c2d7bfd 100644 --- a/plugins/modules/docker_prune.py +++ b/plugins/modules/docker_prune.py @@ -118,13 +118,13 @@ containers: returned: I(containers) is C(true) type: list elements: str - sample: '[]' + sample: [] containers_space_reclaimed: description: - Amount of reclaimed disk space from container pruning in bytes. returned: I(containers) is C(true) type: int - sample: '0' + sample: 0 # images images: @@ -133,13 +133,13 @@ images: returned: I(images) is C(true) type: list elements: str - sample: '[]' + sample: [] images_space_reclaimed: description: - Amount of reclaimed disk space from image pruning in bytes. returned: I(images) is C(true) type: int - sample: '0' + sample: 0 # networks networks: @@ -148,7 +148,7 @@ networks: returned: I(networks) is C(true) type: list elements: str - sample: '[]' + sample: [] # volumes volumes: @@ -157,13 +157,13 @@ volumes: returned: I(volumes) is C(true) type: list elements: str - sample: '[]' + sample: [] volumes_space_reclaimed: description: - Amount of reclaimed disk space from volumes pruning in bytes. returned: I(volumes) is C(true) type: int - sample: '0' + sample: 0 # builder_cache builder_cache_space_reclaimed: @@ -171,7 +171,7 @@ builder_cache_space_reclaimed: - Amount of reclaimed disk space from builder cache pruning in bytes. returned: I(builder_cache) is C(true) type: int - sample: '0' + sample: 0 ''' import traceback diff --git a/plugins/modules/docker_stack_info.py b/plugins/modules/docker_stack_info.py index 1cafcdc2..547fb4d9 100644 --- a/plugins/modules/docker_stack_info.py +++ b/plugins/modules/docker_stack_info.py @@ -24,10 +24,11 @@ results: description: | List of dictionaries containing the list of stacks or tasks associated to a stack name. - sample: > - "results": [{"name":"grafana","namespace":"default","orchestrator":"Kubernetes","services":"2"}] + sample: + - {"name":"grafana","namespace":"default","orchestrator":"Kubernetes","services":"2"} returned: always type: list + elements: dict ''' EXAMPLES = ''' diff --git a/plugins/modules/docker_swarm.py b/plugins/modules/docker_swarm.py index a20807d8..afc58ca8 100644 --- a/plugins/modules/docker_swarm.py +++ b/plugins/modules/docker_swarm.py @@ -277,7 +277,7 @@ actions: returned: when action failed. type: list elements: str - example: "['This cluster is already a swarm cluster']" + example: ['This cluster is already a swarm cluster'] '''