mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudscale: combine docs in fragment (#52069)
* cloudscale: combine docs in fragment * workaround false negative E305
This commit is contained in:
parent
6c17c55b51
commit
02f51e865c
4 changed files with 28 additions and 39 deletions
|
@ -19,12 +19,7 @@ module: cloudscale_floating_ip
|
|||
short_description: Manages floating IPs on the cloudscale.ch IaaS service
|
||||
description:
|
||||
- Create, assign and delete floating IPs on the cloudscale.ch IaaS service.
|
||||
- All operations are performed using the cloudscale.ch public API v1.
|
||||
- "For details consult the full API documentation: U(https://www.cloudscale.ch/en/api/v1)."
|
||||
- A valid API token is required for all operations. You can create as many tokens as you like using the cloudscale.ch control panel at
|
||||
U(https://control.cloudscale.ch).
|
||||
notes:
|
||||
- Instead of the api_token parameter the CLOUDSCALE_API_TOKEN environment variable can be used.
|
||||
- To create a new floating IP at least the C(ip_version) and C(server) options are required.
|
||||
- Once a floating_ip is created all parameters except C(server) are read-only.
|
||||
- It's not possible to request a floating IP without associating it with a server at the same time.
|
||||
|
@ -61,14 +56,7 @@ options:
|
|||
description:
|
||||
- Reverse PTR entry for this address.
|
||||
- You cannot set a reverse PTR entry for IPv6 floating networks. Reverse PTR entries are only allowed for single addresses.
|
||||
api_token:
|
||||
description:
|
||||
- cloudscale.ch API token.
|
||||
- This can also be passed in the CLOUDSCALE_API_TOKEN environment variable.
|
||||
api_timeout:
|
||||
description:
|
||||
- Timeout in seconds for calls to the cloudscale.ch API.
|
||||
default: 30
|
||||
extends_documentation_fragment: cloudscale
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
|
|
@ -19,12 +19,7 @@ module: cloudscale_server
|
|||
short_description: Manages servers on the cloudscale.ch IaaS service
|
||||
description:
|
||||
- Create, start, stop and delete servers on the cloudscale.ch IaaS service.
|
||||
- All operations are performed using the cloudscale.ch public API v1.
|
||||
- "For details consult the full API documentation: U(https://www.cloudscale.ch/en/api/v1)."
|
||||
- A valid API token is required for all operations. You can create as many tokens as you like using the cloudscale.ch control panel at
|
||||
U(https://control.cloudscale.ch).
|
||||
notes:
|
||||
- Instead of the api_token parameter the CLOUDSCALE_API_TOKEN environment variable can be used.
|
||||
- To create a new server at least the C(name), C(ssh_key), C(image) and C(flavor) options are required.
|
||||
- If more than one server with the name given by the C(name) option exists, execution is aborted.
|
||||
- Once a server is created all parameters except C(state) are read-only. You can't change the name, flavor or any other property. This is a limitation
|
||||
|
@ -85,15 +80,12 @@ options:
|
|||
user_data:
|
||||
description:
|
||||
- Cloud-init configuration (cloud-config) data to use for the server.
|
||||
api_token:
|
||||
description:
|
||||
- cloudscale.ch API token.
|
||||
- This can also be passed in the CLOUDSCALE_API_TOKEN environment variable.
|
||||
api_timeout:
|
||||
description:
|
||||
- Timeout in seconds for calls to the cloudscale.ch API.
|
||||
default: 30
|
||||
version_added: "2.5"
|
||||
extends_documentation_fragment: cloudscale
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
|
|
@ -19,15 +19,7 @@ module: cloudscale_volume
|
|||
short_description: Manages volumes on the cloudscale.ch IaaS service
|
||||
description:
|
||||
- Create, attach/detach and delete volumes on the cloudscale.ch IaaS service.
|
||||
- All operations are performed using the cloudscale.ch public API v1.
|
||||
- "For details consult the full API documentation:
|
||||
U(https://www.cloudscale.ch/en/api/v1)."
|
||||
- A valid API token is required for all operations. You can create as many
|
||||
tokens as you like using the cloudscale.ch control panel at
|
||||
U(https://control.cloudscale.ch).
|
||||
notes:
|
||||
- Instead of the I(api_token) parameter the C(CLOUDSCALE_API_TOKEN) environment
|
||||
variable can be used.
|
||||
- To create a new volume at least the I(name) and I(size_gb) options
|
||||
are required.
|
||||
- A volume can be created and attached to a server in the same task.
|
||||
|
@ -61,15 +53,7 @@ options:
|
|||
detach the volume. Currently a volume can only be attached to a
|
||||
single server.
|
||||
aliases: [ server_uuid ]
|
||||
api_token:
|
||||
description:
|
||||
- cloudscale.ch API token.
|
||||
- This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment
|
||||
variable.
|
||||
api_timeout:
|
||||
description:
|
||||
- Timeout in seconds for calls to the cloudscale.ch API.
|
||||
default: 30
|
||||
extends_documentation_fragment: cloudscale
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
|
25
lib/ansible/plugins/doc_fragments/cloudscale.py
Normal file
25
lib/ansible/plugins/doc_fragments/cloudscale.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2019, René Moser <mail@renemoser.net>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard cloudstack documentation fragment
|
||||
DOCUMENTATION = '''
|
||||
options:
|
||||
api_token:
|
||||
description:
|
||||
- cloudscale.ch API token.
|
||||
- This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment variable.
|
||||
api_timeout:
|
||||
description:
|
||||
- Timeout in seconds for calls to the cloudscale.ch API.
|
||||
default: 30
|
||||
notes:
|
||||
- Instead of the api_token parameter the C(CLOUDSCALE_API_TOKEN) environment variable can be used.
|
||||
- All operations are performed using the cloudscale.ch public API v1.
|
||||
- "For details consult the full API documentation: U(https://www.cloudscale.ch/en/api/v1)."
|
||||
- A valid API token is required for all operations. You can create as many tokens as you like using the cloudscale.ch control panel at
|
||||
U(https://control.cloudscale.ch).
|
||||
'''
|
Loading…
Reference in a new issue