mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
[PR #9395/3048d530 backport][stable-9] g*.py: normalize docs (#9414)
g*.py: normalize docs (#9395)
* g*.py: normalize docs
* Update plugins/modules/gandi_livedns.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3048d5305d
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
87d63c5bed
commit
a66b9fc5c9
36 changed files with 633 additions and 683 deletions
|
@ -8,15 +8,14 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: gandi_livedns
|
||||
author:
|
||||
- Gregory Thiemonge (@gthiemonge)
|
||||
version_added: "2.3.0"
|
||||
short_description: Manage Gandi LiveDNS records
|
||||
description:
|
||||
- "Manages DNS records by the Gandi LiveDNS API, see the docs: U(https://doc.livedns.gandi.net/)."
|
||||
- 'Manages DNS records by the Gandi LiveDNS API, see the docs: U(https://doc.livedns.gandi.net/).'
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -27,32 +26,31 @@ attributes:
|
|||
options:
|
||||
personal_access_token:
|
||||
description:
|
||||
- Scoped API token.
|
||||
- One of O(personal_access_token) and O(api_key) must be specified.
|
||||
- Scoped API token.
|
||||
- One of O(personal_access_token) and O(api_key) must be specified.
|
||||
type: str
|
||||
version_added: 9.0.0
|
||||
api_key:
|
||||
description:
|
||||
- Account API token.
|
||||
- Note that these type of keys are deprecated and might stop working at some point.
|
||||
Use personal access tokens instead.
|
||||
- One of O(personal_access_token) and O(api_key) must be specified.
|
||||
- Account API token.
|
||||
- Note that these type of keys are deprecated and might stop working at some point. Use personal access tokens instead.
|
||||
- One of O(personal_access_token) and O(api_key) must be specified.
|
||||
type: str
|
||||
record:
|
||||
description:
|
||||
- Record to add.
|
||||
- Record to add.
|
||||
type: str
|
||||
required: true
|
||||
state:
|
||||
description:
|
||||
- Whether the record(s) should exist or not.
|
||||
- Whether the record(s) should exist or not.
|
||||
type: str
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
ttl:
|
||||
description:
|
||||
- The TTL to give the new record.
|
||||
- Required when O(state=present).
|
||||
- The TTL to give the new record.
|
||||
- Required when O(state=present).
|
||||
type: int
|
||||
type:
|
||||
description:
|
||||
|
@ -61,25 +59,25 @@ options:
|
|||
required: true
|
||||
values:
|
||||
description:
|
||||
- The record values.
|
||||
- Required when O(state=present).
|
||||
- The record values.
|
||||
- Required when O(state=present).
|
||||
type: list
|
||||
elements: str
|
||||
domain:
|
||||
description:
|
||||
- The name of the Domain to work with (for example, "example.com").
|
||||
- The name of the Domain to work with (for example, V(example.com)).
|
||||
required: true
|
||||
type: str
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Create a test A record to point to 127.0.0.1 in the my.com domain
|
||||
community.general.gandi_livedns:
|
||||
domain: my.com
|
||||
record: test
|
||||
type: A
|
||||
values:
|
||||
- 127.0.0.1
|
||||
- 127.0.0.1
|
||||
ttl: 7200
|
||||
personal_access_token: dummytoken
|
||||
register: record
|
||||
|
@ -90,7 +88,7 @@ EXAMPLES = r'''
|
|||
type: CNAME
|
||||
record: mail
|
||||
values:
|
||||
- www
|
||||
- www
|
||||
ttl: 7200
|
||||
personal_access_token: dummytoken
|
||||
state: present
|
||||
|
@ -101,7 +99,7 @@ EXAMPLES = r'''
|
|||
type: CNAME
|
||||
record: mail
|
||||
values:
|
||||
- www
|
||||
- www
|
||||
ttl: 10800
|
||||
personal_access_token: dummytoken
|
||||
state: present
|
||||
|
@ -120,46 +118,46 @@ EXAMPLES = r'''
|
|||
record: test
|
||||
type: A
|
||||
values:
|
||||
- 127.0.0.1
|
||||
- 127.0.0.1
|
||||
ttl: 7200
|
||||
api_key: dummyapikey
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
record:
|
||||
description: A dictionary containing the record data.
|
||||
returned: success, except on record deletion
|
||||
type: dict
|
||||
contains:
|
||||
values:
|
||||
description: The record content (details depend on record type).
|
||||
returned: success
|
||||
type: list
|
||||
elements: str
|
||||
sample:
|
||||
- 192.0.2.91
|
||||
- 192.0.2.92
|
||||
record:
|
||||
description: The record name.
|
||||
returned: success
|
||||
type: str
|
||||
sample: www
|
||||
ttl:
|
||||
description: The time-to-live for the record.
|
||||
returned: success
|
||||
type: int
|
||||
sample: 300
|
||||
type:
|
||||
description: The record type.
|
||||
returned: success
|
||||
type: str
|
||||
sample: A
|
||||
domain:
|
||||
description: The domain associated with the record.
|
||||
returned: success
|
||||
type: str
|
||||
sample: my.com
|
||||
'''
|
||||
description: A dictionary containing the record data.
|
||||
returned: success, except on record deletion
|
||||
type: dict
|
||||
contains:
|
||||
values:
|
||||
description: The record content (details depend on record type).
|
||||
returned: success
|
||||
type: list
|
||||
elements: str
|
||||
sample:
|
||||
- 192.0.2.91
|
||||
- 192.0.2.92
|
||||
record:
|
||||
description: The record name.
|
||||
returned: success
|
||||
type: str
|
||||
sample: www
|
||||
ttl:
|
||||
description: The time-to-live for the record.
|
||||
returned: success
|
||||
type: int
|
||||
sample: 300
|
||||
type:
|
||||
description: The record type.
|
||||
returned: success
|
||||
type: str
|
||||
sample: A
|
||||
domain:
|
||||
description: The domain associated with the record.
|
||||
returned: success
|
||||
type: str
|
||||
sample: my.com
|
||||
"""
|
||||
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue