mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Reformat documentation with 'andebox yaml-doc' (#1020)
* Reformat documentation with 'andebox yaml-doc'. * Revert unwanted changes. * Fix too long lines. * Fix broken quotes. * Forgot two line breaks.
This commit is contained in:
@@ -8,8 +8,7 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_network_info
|
||||
|
||||
short_description: Retrieves facts about docker network
|
||||
@@ -18,7 +17,6 @@ description:
|
||||
- Retrieves facts about a docker network.
|
||||
- Essentially returns the output of C(docker network inspect <name>), similar to what M(community.docker.docker_network)
|
||||
returns for a non-absent network.
|
||||
|
||||
extends_documentation_fragment:
|
||||
- community.docker.docker.api_documentation
|
||||
- community.docker.attributes
|
||||
@@ -38,9 +36,9 @@ author:
|
||||
|
||||
requirements:
|
||||
- "Docker API >= 1.25"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Get infos on network
|
||||
community.docker.docker_network_info:
|
||||
name: mydata
|
||||
@@ -54,50 +52,26 @@ EXAMPLES = '''
|
||||
ansible.builtin.debug:
|
||||
var: result.network
|
||||
when: result.exists
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
exists:
|
||||
description:
|
||||
- Returns whether the network exists.
|
||||
type: bool
|
||||
returned: always
|
||||
sample: true
|
||||
description:
|
||||
- Returns whether the network exists.
|
||||
type: bool
|
||||
returned: always
|
||||
sample: true
|
||||
network:
|
||||
description:
|
||||
- Facts representing the current state of the network. Matches the docker inspection output.
|
||||
- Will be V(none) if network does not exist.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"Attachable": false,
|
||||
"ConfigFrom": {
|
||||
"Network": ""
|
||||
},
|
||||
"ConfigOnly": false,
|
||||
"Containers": {},
|
||||
"Created": "2018-12-07T01:47:51.250835114-06:00",
|
||||
"Driver": "bridge",
|
||||
"EnableIPv6": false,
|
||||
"IPAM": {
|
||||
"Config": [
|
||||
{
|
||||
"Gateway": "192.168.96.1",
|
||||
"Subnet": "192.168.96.0/20"
|
||||
}
|
||||
],
|
||||
"Driver": "default",
|
||||
"Options": null
|
||||
},
|
||||
"Id": "0856968545f22026c41c2c7c3d448319d3b4a6a03a40b148b3ac4031696d1c0a",
|
||||
"Ingress": false,
|
||||
"Internal": false,
|
||||
"Labels": {},
|
||||
"Name": "ansible-test-f2700bba",
|
||||
"Options": {},
|
||||
"Scope": "local"
|
||||
}
|
||||
'''
|
||||
description:
|
||||
- Facts representing the current state of the network. Matches the docker inspection output.
|
||||
- Will be V(none) if network does not exist.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {"Attachable": false, "ConfigFrom": {"Network": ""}, "ConfigOnly": false, "Containers": {}, "Created": "2018-12-07T01:47:51.250835114-06:00",
|
||||
"Driver": "bridge", "EnableIPv6": false, "IPAM": {"Config": [{"Gateway": "192.168.96.1", "Subnet": "192.168.96.0/20"}],
|
||||
"Driver": "default", "Options": null}, "Id": "0856968545f22026c41c2c7c3d448319d3b4a6a03a40b148b3ac4031696d1c0a", "Ingress": false,
|
||||
"Internal": false, "Labels": {}, "Name": "ansible-test-f2700bba", "Options": {}, "Scope": "local"}
|
||||
"""
|
||||
|
||||
import traceback
|
||||
|
||||
|
||||
Reference in New Issue
Block a user