mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
[PR #9388/6aadcc72 backport][stable-10] [mem ... n]*.py: normalize docs (#9406)
[mem ... n]*.py: normalize docs (#9388)
* [mem ... n]*.py: normalize docs
* Update plugins/modules/netcup_dns.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* netcup_dns: change type of RV(records)
From complex to list of dicts.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6aadcc72d1
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
03f3b74934
commit
7732d64abb
25 changed files with 2245 additions and 2342 deletions
|
@ -9,13 +9,12 @@ from __future__ import absolute_import, division, print_function
|
|||
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: netcup_dns
|
||||
notes: []
|
||||
short_description: Manage Netcup DNS records
|
||||
description:
|
||||
- "Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)."
|
||||
- Manages DNS records using the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php).
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -26,12 +25,12 @@ attributes:
|
|||
options:
|
||||
api_key:
|
||||
description:
|
||||
- "API key for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))."
|
||||
- API key for authentication, must be obtained using the netcup CCP (U(https://ccp.netcup.net)).
|
||||
required: true
|
||||
type: str
|
||||
api_password:
|
||||
description:
|
||||
- "API password for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))."
|
||||
- API password for authentication, must be obtained using the netcup CCP (U(https://ccp.netcup.net)).
|
||||
required: true
|
||||
type: str
|
||||
customer_id:
|
||||
|
@ -48,7 +47,7 @@ options:
|
|||
description:
|
||||
- Record to add or delete, supports wildcard (V(*)). Default is V(@) (that is, the zone name).
|
||||
default: "@"
|
||||
aliases: [ name ]
|
||||
aliases: [name]
|
||||
type: str
|
||||
type:
|
||||
description:
|
||||
|
@ -80,7 +79,7 @@ options:
|
|||
- Whether the record should exist or not.
|
||||
required: false
|
||||
default: present
|
||||
choices: [ 'present', 'absent' ]
|
||||
choices: ['present', 'absent']
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
|
@ -91,10 +90,9 @@ options:
|
|||
requirements:
|
||||
- "nc-dnsapi >= 0.1.3"
|
||||
author: "Nicolai Buchwitz (@nbuchwitz)"
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Create a record of type A
|
||||
community.general.netcup_dns:
|
||||
api_key: "..."
|
||||
|
@ -156,41 +154,41 @@ EXAMPLES = '''
|
|||
type: "A"
|
||||
value: "127.0.0.1"
|
||||
timeout: 30
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
records:
|
||||
description: list containing all records
|
||||
returned: success
|
||||
type: complex
|
||||
contains:
|
||||
name:
|
||||
description: the record name
|
||||
returned: success
|
||||
type: str
|
||||
sample: fancy-hostname
|
||||
type:
|
||||
description: the record type
|
||||
returned: success
|
||||
type: str
|
||||
sample: A
|
||||
value:
|
||||
description: the record destination
|
||||
returned: success
|
||||
type: str
|
||||
sample: 127.0.0.1
|
||||
priority:
|
||||
description: the record priority (only relevant if type=MX)
|
||||
returned: success
|
||||
type: int
|
||||
sample: 0
|
||||
id:
|
||||
description: internal id of the record
|
||||
returned: success
|
||||
type: int
|
||||
sample: 12345
|
||||
'''
|
||||
description: List containing all records.
|
||||
returned: success
|
||||
type: list
|
||||
elements: dict
|
||||
contains:
|
||||
name:
|
||||
description: The record name.
|
||||
returned: success
|
||||
type: str
|
||||
sample: fancy-hostname
|
||||
type:
|
||||
description: The record type.
|
||||
returned: success
|
||||
type: str
|
||||
sample: A
|
||||
value:
|
||||
description: The record destination.
|
||||
returned: success
|
||||
type: str
|
||||
sample: 127.0.0.1
|
||||
priority:
|
||||
description: The record priority (only relevant if RV(records[].type=MX)).
|
||||
returned: success
|
||||
type: int
|
||||
sample: 0
|
||||
id:
|
||||
description: Internal id of the record.
|
||||
returned: success
|
||||
type: int
|
||||
sample: 12345
|
||||
"""
|
||||
|
||||
import traceback
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue