s[a-c]*: normalize docs (#9353)

* s[a-c]*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9101/merge
Alexei Znamensky 2024-12-26 09:16:10 +13:00 committed by GitHub
parent 825e0ee377
commit 70b62ed745
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 336 additions and 382 deletions

View File

@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: say module: say
short_description: Makes a computer to speak short_description: Makes a computer to speak
description: description:
- makes a computer speak! Amuse your friends, annoy your coworkers! - Makes a computer speak! Amuse your friends, annoy your coworkers!
notes: notes:
- In 2.5, this module has been renamed from C(osx_say) to M(community.general.say). - In 2.5, this module has been renamed from C(osx_say) to M(community.general.say).
- If you like this module, you may also be interested in the osx_say callback plugin. - If you like this module, you may also be interested in the osx_say callback plugin.
@ -37,19 +36,19 @@ options:
description: description:
- What voice to use. - What voice to use.
required: false required: false
requirements: [ say or espeak or espeak-ng ] requirements: [say or espeak or espeak-ng]
author: author:
- "Ansible Core Team" - "Ansible Core Team"
- "Michael DeHaan (@mpdehaan)" - "Michael DeHaan (@mpdehaan)"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Makes a computer to speak - name: Makes a computer to speak
community.general.say: community.general.say:
msg: '{{ inventory_hostname }} is all done' msg: '{{ inventory_hostname }} is all done'
voice: Zarvox voice: Zarvox
delegate_to: localhost delegate_to: localhost
''' """
import platform import platform
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -13,13 +13,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_compute module: scaleway_compute
short_description: Scaleway compute management module short_description: Scaleway compute management module
author: Remy Leone (@remyleone) author: Remy Leone (@remyleone)
description: description:
- "This module manages compute instances on Scaleway." - This module manages compute instances on Scaleway.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -35,35 +34,33 @@ options:
public_ip: public_ip:
type: str type: str
description: description:
- Manage public IP on a Scaleway server - Manage public IP on a Scaleway server.
- Could be Scaleway IP address UUID - Could be Scaleway IP address UUID.
- V(dynamic) Means that IP is destroyed at the same time the host is destroyed - V(dynamic) Means that IP is destroyed at the same time the host is destroyed.
- V(absent) Means no public IP at all - V(absent) Means no public IP at all.
default: absent default: absent
enable_ipv6: enable_ipv6:
description: description:
- Enable public IPv6 connectivity on the instance - Enable public IPv6 connectivity on the instance.
default: false default: false
type: bool type: bool
image: image:
type: str type: str
description: description:
- Image identifier used to start the instance with - Image identifier used to start the instance with.
required: true required: true
name: name:
type: str type: str
description: description:
- Name of the instance - Name of the instance.
organization: organization:
type: str type: str
description: description:
- Organization identifier. - Organization identifier.
- Exactly one of O(project) and O(organization) must be specified. - Exactly one of O(project) and O(organization) must be specified.
project: project:
type: str type: str
description: description:
@ -87,14 +84,14 @@ options:
type: list type: list
elements: str elements: str
description: description:
- List of tags to apply to the instance (5 max) - List of tags to apply to the instance (5 max).
required: false required: false
default: [] default: []
region: region:
type: str type: str
description: description:
- Scaleway compute zone - Scaleway compute zone.
required: true required: true
choices: choices:
- ams1 - ams1
@ -109,7 +106,7 @@ options:
commercial_type: commercial_type:
type: str type: str
description: description:
- Commercial name of the compute node - Commercial name of the compute node.
required: true required: true
wait: wait:
@ -121,26 +118,26 @@ options:
wait_timeout: wait_timeout:
type: int type: int
description: description:
- Time to wait for the server to reach the expected state - Time to wait for the server to reach the expected state.
required: false required: false
default: 300 default: 300
wait_sleep_time: wait_sleep_time:
type: int type: int
description: description:
- Time to wait before every attempt to check the state of the server - Time to wait before every attempt to check the state of the server.
required: false required: false
default: 3 default: 3
security_group: security_group:
type: str type: str
description: description:
- Security group unique identifier - Security group unique identifier.
- If no value provided, the default security group or current security group will be used - If no value provided, the default security group or current security group will be used.
required: false required: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a server - name: Create a server
community.general.scaleway_compute: community.general.scaleway_compute:
name: foobar name: foobar
@ -174,10 +171,10 @@ EXAMPLES = '''
project: 951df375-e094-4d26-97c1-ba548eeb9c42 project: 951df375-e094-4d26-97c1-ba548eeb9c42
region: ams1 region: ams1
commercial_type: VC1S commercial_type: VC1S
''' """
RETURN = ''' RETURN = r"""
''' """
import datetime import datetime
import time import time

View File

@ -11,15 +11,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_compute_private_network module: scaleway_compute_private_network
short_description: Scaleway compute - private network management short_description: Scaleway compute - private network management
version_added: 5.2.0 version_added: 5.2.0
author: Pascal MANGIN (@pastral) author: Pascal MANGIN (@pastral)
description: description:
- This module add or remove a private network to a compute instance - This module add or remove a private network to a compute instance (U(https://developer.scaleway.com)).
(U(https://developer.scaleway.com)).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -72,10 +70,9 @@ options:
description: description:
- ID of the private network (see M(community.general.scaleway_private_network)). - ID of the private network (see M(community.general.scaleway_private_network)).
required: true required: true
"""
''' EXAMPLES = r"""
EXAMPLES = '''
- name: Plug a VM to a private network - name: Plug a VM to a private network
community.general.scaleway_compute_private_network: community.general.scaleway_compute_private_network:
project: '{{ scw_project }}' project: '{{ scw_project }}'
@ -92,10 +89,9 @@ EXAMPLES = '''
region: par1 region: par1
compute_id: "12345678-f1e6-40ec-83e5-12345d67ed89" compute_id: "12345678-f1e6-40ec-83e5-12345d67ed89"
private_network_id: "22345678-f1e6-40ec-83e5-12345d67ed89" private_network_id: "22345678-f1e6-40ec-83e5-12345d67ed89"
"""
''' RETURN = r"""
RETURN = '''
scaleway_compute_private_network: scaleway_compute_private_network:
description: Information on the VPC. description: Information on the VPC.
returned: success when O(state=present) returned: success when O(state=present)
@ -117,7 +113,8 @@ scaleway_compute_private_network:
"updated_at": "2022-01-15T11:12:04.624837Z", "updated_at": "2022-01-15T11:12:04.624837Z",
"zone": "fr-par-2" "zone": "fr-par-2"
} }
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_container module: scaleway_container
short_description: Scaleway Container management short_description: Scaleway Container management
version_added: 6.0.0 version_added: 6.0.0
@ -109,7 +108,8 @@ options:
privacy: privacy:
description: description:
- Privacy policies define whether a container can be executed anonymously. - Privacy policies define whether a container can be executed anonymously.
- Choose V(public) to enable anonymous execution, or V(private) to protect your container with an authentication mechanism provided by the Scaleway API. - Choose V(public) to enable anonymous execution, or V(private) to protect your container with an authentication mechanism provided by the
Scaleway API.
type: str type: str
default: public default: public
choices: choices:
@ -147,9 +147,9 @@ options:
- Redeploy the container if update is required. - Redeploy the container if update is required.
type: bool type: bool
default: false default: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a container - name: Create a container
community.general.scaleway_container: community.general.scaleway_container:
namespace_id: '{{ scw_container_namespace }}' namespace_id: '{{ scw_container_namespace }}'
@ -169,9 +169,9 @@ EXAMPLES = '''
state: absent state: absent
region: fr-par region: fr-par
name: my-awesome-container name: my-awesome-container
''' """
RETURN = ''' RETURN = r"""
container: container:
description: The container information. description: The container information.
returned: when O(state=present) returned: when O(state=present)
@ -201,7 +201,7 @@ container:
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: created status: created
timeout: 300s timeout: 300s
''' """
from copy import deepcopy from copy import deepcopy

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_container_info module: scaleway_container_info
short_description: Retrieve information on Scaleway Container short_description: Retrieve information on Scaleway Container
version_added: 6.0.0 version_added: 6.0.0
@ -46,18 +45,18 @@ options:
description: description:
- Name of the container. - Name of the container.
required: true required: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get a container info - name: Get a container info
community.general.scaleway_container_info: community.general.scaleway_container_info:
namespace_id: '{{ scw_container_namespace }}' namespace_id: '{{ scw_container_namespace }}'
region: fr-par region: fr-par
name: my-awesome-container name: my-awesome-container
register: container_info_task register: container_info_task
''' """
RETURN = ''' RETURN = r"""
container: container:
description: The container information. description: The container information.
returned: always returned: always
@ -87,7 +86,7 @@ container:
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: created status: created
timeout: 300s timeout: 300s
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_container_namespace module: scaleway_container_namespace
short_description: Scaleway Container namespace management short_description: Scaleway Container namespace management
version_added: 6.0.0 version_added: 6.0.0
@ -84,9 +83,9 @@ options:
- Injected in containers at runtime. - Injected in containers at runtime.
type: dict type: dict
default: {} default: {}
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a container namespace - name: Create a container namespace
community.general.scaleway_container_namespace: community.general.scaleway_container_namespace:
project_id: '{{ scw_project }}' project_id: '{{ scw_project }}'
@ -105,9 +104,9 @@ EXAMPLES = '''
state: absent state: absent
region: fr-par region: fr-par
name: my-awesome-container-namespace name: my-awesome-container-namespace
''' """
RETURN = ''' RETURN = r"""
container_namespace: container_namespace:
description: The container namespace information. description: The container namespace information.
returned: when O(state=present) returned: when O(state=present)
@ -128,7 +127,7 @@ container_namespace:
- key: MY_SECRET_VAR - key: MY_SECRET_VAR
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: pending status: pending
''' """
from copy import deepcopy from copy import deepcopy

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_container_namespace_info module: scaleway_container_namespace_info
short_description: Retrieve information on Scaleway Container namespace short_description: Retrieve information on Scaleway Container namespace
version_added: 6.0.0 version_added: 6.0.0
@ -46,18 +45,18 @@ options:
description: description:
- Name of the container namespace. - Name of the container namespace.
required: true required: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get a container namespace info - name: Get a container namespace info
community.general.scaleway_container_namespace_info: community.general.scaleway_container_namespace_info:
project_id: '{{ scw_project }}' project_id: '{{ scw_project }}'
region: fr-par region: fr-par
name: my-awesome-container-namespace name: my-awesome-container-namespace
register: container_namespace_info_task register: container_namespace_info_task
''' """
RETURN = ''' RETURN = r"""
container_namespace: container_namespace:
description: The container namespace information. description: The container namespace information.
returned: always returned: always
@ -66,7 +65,7 @@ container_namespace:
description: "" description: ""
environment_variables: environment_variables:
MY_VAR: my_value MY_VAR: my_value
error_message: null error_message:
id: 531a1fd7-98d2-4a74-ad77-d398324304b8 id: 531a1fd7-98d2-4a74-ad77-d398324304b8
name: my-awesome-container-namespace name: my-awesome-container-namespace
organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0
@ -78,7 +77,7 @@ container_namespace:
- key: MY_SECRET_VAR - key: MY_SECRET_VAR
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: pending status: pending
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_container_registry module: scaleway_container_registry
short_description: Scaleway Container registry management module short_description: Scaleway Container registry management module
version_added: 5.8.0 version_added: 5.8.0
@ -77,9 +76,9 @@ options:
- public - public
- private - private
default: private default: private
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a container registry - name: Create a container registry
community.general.scaleway_container_registry: community.general.scaleway_container_registry:
project_id: '{{ scw_project }}' project_id: '{{ scw_project }}'
@ -94,9 +93,9 @@ EXAMPLES = '''
state: absent state: absent
region: fr-par region: fr-par
name: my-awesome-container-registry name: my-awesome-container-registry
''' """
RETURN = ''' RETURN = r"""
container_registry: container_registry:
description: The container registry information. description: The container registry information.
returned: when O(state=present) returned: when O(state=present)
@ -116,7 +115,7 @@ container_registry:
status: ready status: ready
status_message: "" status_message: ""
updated_at: "2022-10-14T09:51:07.949716Z" updated_at: "2022-10-14T09:51:07.949716Z"
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_container_registry_info module: scaleway_container_registry_info
short_description: Scaleway Container registry info module short_description: Scaleway Container registry info module
version_added: 5.8.0 version_added: 5.8.0
@ -46,18 +45,18 @@ options:
description: description:
- Name of the container registry. - Name of the container registry.
required: true required: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get a container registry info - name: Get a container registry info
community.general.scaleway_container_registry_info: community.general.scaleway_container_registry_info:
project_id: '{{ scw_project }}' project_id: '{{ scw_project }}'
region: fr-par region: fr-par
name: my-awesome-container-registry name: my-awesome-container-registry
register: container_registry_info_task register: container_registry_info_task
''' """
RETURN = ''' RETURN = r"""
container_registry: container_registry:
description: The container registry information. description: The container registry information.
returned: always returned: always
@ -77,7 +76,7 @@ container_registry:
status: ready status: ready
status_message: "" status_message: ""
updated_at: "2022-10-14T09:51:07.949716Z" updated_at: "2022-10-14T09:51:07.949716Z"
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,

View File

@ -12,14 +12,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_database_backup module: scaleway_database_backup
short_description: Scaleway database backups management module short_description: Scaleway database backups management module
version_added: 1.2.0 version_added: 1.2.0
author: Guillaume Rodriguez (@guillaume_ro_fr) author: Guillaume Rodriguez (@guillaume_ro_fr)
description: description:
- "This module manages database backups on Scaleway account U(https://developer.scaleway.com)." - This module manages database backups on Scaleway account U(https://developer.scaleway.com).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -110,10 +109,10 @@ options:
type: int type: int
required: false required: false
default: 3 default: 3
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a backup - name: Create a backup
community.general.scaleway_database_backup: community.general.scaleway_database_backup:
name: 'my_backup' name: 'my_backup'
state: present state: present
@ -121,13 +120,13 @@ EXAMPLES = '''
database_name: 'my-database' database_name: 'my-database'
instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb' instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Export a backup - name: Export a backup
community.general.scaleway_database_backup: community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691' id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: exported state: exported
region: 'fr-par' region: 'fr-par'
- name: Restore a backup - name: Restore a backup
community.general.scaleway_database_backup: community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691' id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: restored state: restored
@ -135,14 +134,14 @@ EXAMPLES = '''
database_name: 'my-new-database' database_name: 'my-new-database'
instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb' instance_id: '50968a80-2909-4e5c-b1af-a2e19860dddb'
- name: Remove a backup - name: Remove a backup
community.general.scaleway_database_backup: community.general.scaleway_database_backup:
id: '6ef1125a-037e-494f-a911-6d9c49a51691' id: '6ef1125a-037e-494f-a911-6d9c49a51691'
state: absent state: absent
region: 'fr-par' region: 'fr-par'
''' """
RETURN = ''' RETURN = r"""
metadata: metadata:
description: Backup metadata. description: Backup metadata.
returned: when O(state=present), O(state=exported), or O(state=restored) returned: when O(state=present), O(state=exported), or O(state=restored)
@ -164,7 +163,7 @@ metadata:
"updated_at": "2020-08-06T12:42:10.581649Z" "updated_at": "2020-08-06T12:42:10.581649Z"
} }
} }
''' """
import datetime import datetime
import time import time

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_function module: scaleway_function
short_description: Scaleway Function management short_description: Scaleway Function management
version_added: 6.0.0 version_added: 6.0.0
@ -97,8 +96,8 @@ options:
runtime: runtime:
description: description:
- Runtime of the function - Runtime of the function.
- See U(https://www.scaleway.com/en/docs/compute/functions/reference-content/functions-lifecycle/) for all available runtimes - See U(https://www.scaleway.com/en/docs/compute/functions/reference-content/functions-lifecycle/) for all available runtimes.
type: str type: str
required: true required: true
@ -121,7 +120,8 @@ options:
privacy: privacy:
description: description:
- Privacy policies define whether a function can be executed anonymously. - Privacy policies define whether a function can be executed anonymously.
- Choose V(public) to enable anonymous execution, or V(private) to protect your function with an authentication mechanism provided by the Scaleway API. - Choose V(public) to enable anonymous execution, or V(private) to protect your function with an authentication mechanism provided by the
Scaleway API.
type: str type: str
default: public default: public
choices: choices:
@ -133,9 +133,9 @@ options:
- Redeploy the function if update is required. - Redeploy the function if update is required.
type: bool type: bool
default: false default: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a function - name: Create a function
community.general.scaleway_function: community.general.scaleway_function:
namespace_id: '{{ scw_function_namespace }}' namespace_id: '{{ scw_function_namespace }}'
@ -155,9 +155,9 @@ EXAMPLES = '''
region: fr-par region: fr-par
state: absent state: absent
name: my-awesome-function name: my-awesome-function
''' """
RETURN = ''' RETURN = r"""
function: function:
description: The function information. description: The function information.
returned: when O(state=present) returned: when O(state=present)
@ -186,7 +186,7 @@ function:
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: created status: created
timeout: 300s timeout: 300s
''' """
from copy import deepcopy from copy import deepcopy

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_function_info module: scaleway_function_info
short_description: Retrieve information on Scaleway Function short_description: Retrieve information on Scaleway Function
version_added: 6.0.0 version_added: 6.0.0
@ -46,18 +45,18 @@ options:
description: description:
- Name of the function. - Name of the function.
required: true required: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get a function info - name: Get a function info
community.general.scaleway_function_info: community.general.scaleway_function_info:
namespace_id: '{{ scw_function_namespace }}' namespace_id: '{{ scw_function_namespace }}'
region: fr-par region: fr-par
name: my-awesome-function name: my-awesome-function
register: function_info_task register: function_info_task
''' """
RETURN = ''' RETURN = r"""
function: function:
description: The function information. description: The function information.
returned: always returned: always
@ -68,7 +67,7 @@ function:
domain_name: fnansibletestfxamabuc-fn-ansible-test.functions.fnc.fr-par.scw.cloud domain_name: fnansibletestfxamabuc-fn-ansible-test.functions.fnc.fr-par.scw.cloud
environment_variables: environment_variables:
MY_VAR: my_value MY_VAR: my_value
error_message: null error_message:
handler: handler.handle handler: handler.handle
http_option: "" http_option: ""
id: ceb64dc4-4464-4196-8e20-ecef705475d3 id: ceb64dc4-4464-4196-8e20-ecef705475d3
@ -86,7 +85,7 @@ function:
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: created status: created
timeout: 300s timeout: 300s
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_function_namespace module: scaleway_function_namespace
short_description: Scaleway Function namespace management short_description: Scaleway Function namespace management
version_added: 6.0.0 version_added: 6.0.0
@ -84,9 +83,9 @@ options:
- Injected in functions at runtime. - Injected in functions at runtime.
type: dict type: dict
default: {} default: {}
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a function namespace - name: Create a function namespace
community.general.scaleway_function_namespace: community.general.scaleway_function_namespace:
project_id: '{{ scw_project }}' project_id: '{{ scw_project }}'
@ -105,9 +104,9 @@ EXAMPLES = '''
state: absent state: absent
region: fr-par region: fr-par
name: my-awesome-function-namespace name: my-awesome-function-namespace
''' """
RETURN = ''' RETURN = r"""
function_namespace: function_namespace:
description: The function namespace information. description: The function namespace information.
returned: when O(state=present) returned: when O(state=present)
@ -116,7 +115,7 @@ function_namespace:
description: "" description: ""
environment_variables: environment_variables:
MY_VAR: my_value MY_VAR: my_value
error_message: null error_message:
id: 531a1fd7-98d2-4a74-ad77-d398324304b8 id: 531a1fd7-98d2-4a74-ad77-d398324304b8
name: my-awesome-function-namespace name: my-awesome-function-namespace
organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0
@ -128,7 +127,7 @@ function_namespace:
- key: MY_SECRET_VAR - key: MY_SECRET_VAR
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: pending status: pending
''' """
from copy import deepcopy from copy import deepcopy

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_function_namespace_info module: scaleway_function_namespace_info
short_description: Retrieve information on Scaleway Function namespace short_description: Retrieve information on Scaleway Function namespace
version_added: 6.0.0 version_added: 6.0.0
@ -46,18 +45,18 @@ options:
description: description:
- Name of the function namespace. - Name of the function namespace.
required: true required: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Get a function namespace info - name: Get a function namespace info
community.general.scaleway_function_namespace_info: community.general.scaleway_function_namespace_info:
project_id: '{{ scw_project }}' project_id: '{{ scw_project }}'
region: fr-par region: fr-par
name: my-awesome-function-namespace name: my-awesome-function-namespace
register: function_namespace_info_task register: function_namespace_info_task
''' """
RETURN = ''' RETURN = r"""
function_namespace: function_namespace:
description: The function namespace information. description: The function namespace information.
returned: always returned: always
@ -66,7 +65,7 @@ function_namespace:
description: "" description: ""
environment_variables: environment_variables:
MY_VAR: my_value MY_VAR: my_value
error_message: null error_message:
id: 531a1fd7-98d2-4a74-ad77-d398324304b8 id: 531a1fd7-98d2-4a74-ad77-d398324304b8
name: my-awesome-function-namespace name: my-awesome-function-namespace
organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0 organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0
@ -78,7 +77,7 @@ function_namespace:
- key: MY_SECRET_VAR - key: MY_SECRET_VAR
value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
status: pending status: pending
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (
SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway, SCALEWAY_REGIONS, scaleway_argument_spec, Scaleway,

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_image_info module: scaleway_image_info
short_description: Gather information about the Scaleway images available short_description: Gather information about the Scaleway images available
description: description:
@ -37,9 +36,9 @@ options:
- EMEA-FR-PAR2 - EMEA-FR-PAR2
- waw1 - waw1
- EMEA-PL-WAW1 - EMEA-PL-WAW1
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Gather Scaleway images information - name: Gather Scaleway images information
community.general.scaleway_image_info: community.general.scaleway_image_info:
region: par1 region: par1
@ -47,14 +46,13 @@ EXAMPLES = r'''
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_image_info }}" msg: "{{ result.scaleway_image_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_image_info: scaleway_image_info:
description: description:
- Response from Scaleway API. - Response from Scaleway API.
- "For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)." - 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/).'
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -91,7 +89,7 @@ scaleway_image_info:
"state": "available" "state": "available"
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (

View File

@ -11,14 +11,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_ip module: scaleway_ip
short_description: Scaleway IP management module short_description: Scaleway IP management module
author: Remy Leone (@remyleone) author: Remy Leone (@remyleone)
description: description:
- This module manages IP on Scaleway account - This module manages IP on Scaleway account U(https://developer.scaleway.com).
U(https://developer.scaleway.com)
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -42,7 +40,7 @@ options:
organization: organization:
type: str type: str
description: description:
- Scaleway organization identifier - Scaleway organization identifier.
required: true required: true
region: region:
@ -63,21 +61,19 @@ options:
id: id:
type: str type: str
description: description:
- id of the Scaleway IP (UUID) - Id of the Scaleway IP (UUID).
server: server:
type: str type: str
description: description:
- id of the server you want to attach an IP to. - Id of the server you want to attach an IP to.
- To unattach an IP don't specify this option - To unattach an IP don't specify this option.
reverse: reverse:
type: str type: str
description: description:
- Reverse to assign to the IP - Reverse to assign to the IP.
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create an IP - name: Create an IP
community.general.scaleway_ip: community.general.scaleway_ip:
organization: '{{ scw_org }}' organization: '{{ scw_org }}'
@ -90,9 +86,9 @@ EXAMPLES = '''
id: '{{ ip_creation_task.scaleway_ip.id }}' id: '{{ ip_creation_task.scaleway_ip.id }}'
state: absent state: absent
region: par1 region: par1
''' """
RETURN = ''' RETURN = r"""
data: data:
description: This is only present when O(state=present). description: This is only present when O(state=present).
returned: when O(state=present) returned: when O(state=present)
@ -111,7 +107,7 @@ data:
} }
] ]
} }
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_ip_info module: scaleway_ip_info
short_description: Gather information about the Scaleway ips available short_description: Gather information about the Scaleway ips available
description: description:
@ -37,9 +36,9 @@ options:
- EMEA-FR-PAR2 - EMEA-FR-PAR2
- waw1 - waw1
- EMEA-PL-WAW1 - EMEA-PL-WAW1
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Gather Scaleway ips information - name: Gather Scaleway ips information
community.general.scaleway_ip_info: community.general.scaleway_ip_info:
region: par1 region: par1
@ -47,14 +46,13 @@ EXAMPLES = r'''
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_ip_info }}" msg: "{{ result.scaleway_ip_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_ip_info: scaleway_ip_info:
description: description:
- Response from Scaleway API. - Response from Scaleway API.
- "For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)." - 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)'
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -71,7 +69,7 @@ scaleway_ip_info:
} }
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (

View File

@ -13,13 +13,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_lb module: scaleway_lb
short_description: Scaleway load-balancer management module short_description: Scaleway load-balancer management module
author: Remy Leone (@remyleone) author: Remy Leone (@remyleone)
description: description:
- "This module manages load-balancers on Scaleway." - This module manages load-balancers on Scaleway.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -75,7 +74,6 @@ options:
default: [] default: []
description: description:
- List of tags to apply to the load-balancer. - List of tags to apply to the load-balancer.
wait: wait:
description: description:
- Wait for the load-balancer to reach its desired state before returning. - Wait for the load-balancer to reach its desired state before returning.
@ -95,9 +93,9 @@ options:
- Time to wait before every attempt to check the state of the load-balancer. - Time to wait before every attempt to check the state of the load-balancer.
required: false required: false
default: 3 default: 3
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a load-balancer - name: Create a load-balancer
community.general.scaleway_lb: community.general.scaleway_lb:
name: foobar name: foobar
@ -113,7 +111,7 @@ EXAMPLES = '''
state: absent state: absent
organization_id: 951df375-e094-4d26-97c1-ba548eeb9c42 organization_id: 951df375-e094-4d26-97c1-ba548eeb9c42
region: fr-par region: fr-par
''' """
RETURNS = ''' RETURNS = '''
{ {

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_organization_info module: scaleway_organization_info
short_description: Gather information about the Scaleway organizations available short_description: Gather information about the Scaleway organizations available
description: description:
@ -27,20 +26,18 @@ extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
"""
''' EXAMPLES = r"""
EXAMPLES = r'''
- name: Gather Scaleway organizations information - name: Gather Scaleway organizations information
community.general.scaleway_organization_info: community.general.scaleway_organization_info:
register: result register: result
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_organization_info }}" msg: "{{ result.scaleway_organization_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_organization_info: scaleway_organization_info:
description: Response from Scaleway API. description: Response from Scaleway API.
returned: success returned: success
@ -70,7 +67,7 @@ scaleway_organization_info:
"warnings": [] "warnings": []
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule, env_fallback from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (

View File

@ -11,14 +11,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_private_network module: scaleway_private_network
short_description: Scaleway private network management short_description: Scaleway private network management
version_added: 4.5.0 version_added: 4.5.0
author: Pascal MANGIN (@pastral) author: Pascal MANGIN (@pastral)
description: description:
- "This module manages private network on Scaleway account (U(https://developer.scaleway.com))." - This module manages private network on Scaleway account (U(https://developer.scaleway.com)).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -64,17 +63,15 @@ options:
type: str type: str
description: description:
- Name of the VPC. - Name of the VPC.
tags: tags:
type: list type: list
elements: str elements: str
description: description:
- List of tags to apply to the instance. - List of tags to apply to the instance.
default: [] default: []
"""
''' EXAMPLES = r"""
EXAMPLES = '''
- name: Create an private network - name: Create an private network
community.general.scaleway_vpc: community.general.scaleway_vpc:
project: '{{ scw_project }}' project: '{{ scw_project }}'
@ -88,9 +85,9 @@ EXAMPLES = '''
name: 'foo' name: 'foo'
state: absent state: absent
region: par1 region: par1
''' """
RETURN = ''' RETURN = r"""
scaleway_private_network: scaleway_private_network:
description: Information on the VPC. description: Information on the VPC.
returned: success when O(state=present) returned: success when O(state=present)
@ -112,7 +109,7 @@ scaleway_private_network:
"updated_at": "2022-01-15T11:12:04.624837Z", "updated_at": "2022-01-15T11:12:04.624837Z",
"zone": "fr-par-2" "zone": "fr-par-2"
} }
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -12,13 +12,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_security_group module: scaleway_security_group
short_description: Scaleway Security Group management module short_description: Scaleway Security Group management module
author: Antoine Barbare (@abarbare) author: Antoine Barbare (@abarbare)
description: description:
- "This module manages Security Group on Scaleway account U(https://developer.scaleway.com)." - This module manages Security Group on Scaleway account U(https://developer.scaleway.com).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -34,7 +33,7 @@ options:
description: description:
- Indicate desired state of the Security Group. - Indicate desired state of the Security Group.
type: str type: str
choices: [ absent, present ] choices: [absent, present]
default: present default: present
organization: organization:
@ -79,21 +78,21 @@ options:
description: description:
- Default policy for incoming traffic. - Default policy for incoming traffic.
type: str type: str
choices: [ accept, drop ] choices: [accept, drop]
outbound_default_policy: outbound_default_policy:
description: description:
- Default policy for outcoming traffic. - Default policy for outcoming traffic.
type: str type: str
choices: [ accept, drop ] choices: [accept, drop]
organization_default: organization_default:
description: description:
- Create security group to be the default one. - Create security group to be the default one.
type: bool type: bool
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a Security Group - name: Create a Security Group
community.general.scaleway_security_group: community.general.scaleway_security_group:
state: present state: present
@ -106,9 +105,9 @@ EXAMPLES = '''
outbound_default_policy: accept outbound_default_policy: accept
organization_default: false organization_default: false
register: security_group_creation_task register: security_group_creation_task
''' """
RETURN = ''' RETURN = r"""
data: data:
description: This is only present when O(state=present). description: This is only present when O(state=present).
returned: when O(state=present) returned: when O(state=present)
@ -127,7 +126,7 @@ data:
"stateful": false "stateful": false
} }
} }
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_security_group_info module: scaleway_security_group_info
short_description: Gather information about the Scaleway security groups available short_description: Gather information about the Scaleway security groups available
description: description:
@ -36,10 +35,9 @@ extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
- community.general.attributes.info_module - community.general.attributes.info_module
"""
''' EXAMPLES = r"""
EXAMPLES = r'''
- name: Gather Scaleway security groups information - name: Gather Scaleway security groups information
community.general.scaleway_security_group_info: community.general.scaleway_security_group_info:
region: par1 region: par1
@ -47,14 +45,13 @@ EXAMPLES = r'''
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_security_group_info }}" msg: "{{ result.scaleway_security_group_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_security_group_info: scaleway_security_group_info:
description: description:
- Response from Scaleway API. - Response from Scaleway API.
- "For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)." - 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/).'
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -75,7 +72,7 @@ scaleway_security_group_info:
] ]
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (

View File

@ -12,13 +12,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_security_group_rule module: scaleway_security_group_rule
short_description: Scaleway Security Group Rule management module short_description: Scaleway Security Group Rule management module
author: Antoine Barbare (@abarbare) author: Antoine Barbare (@abarbare)
description: description:
- "This module manages Security Group Rule on Scaleway account U(https://developer.scaleway.com)." - This module manages Security Group Rule on Scaleway account U(https://developer.scaleway.com).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
@ -99,10 +98,10 @@ options:
description: description:
- Security Group unique identifier. - Security Group unique identifier.
required: true required: true
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a Security Group Rule - name: Create a Security Group Rule
community.general.scaleway_security_group_rule: community.general.scaleway_security_group_rule:
state: present state: present
region: par1 region: par1
@ -113,9 +112,9 @@ EXAMPLES = '''
action: accept action: accept
security_group: b57210ee-1281-4820-a6db-329f78596ecb security_group: b57210ee-1281-4820-a6db-329f78596ecb
register: security_group_rule_creation_task register: security_group_rule_creation_task
''' """
RETURN = ''' RETURN = r"""
data: data:
description: This is only present when O(state=present). description: This is only present when O(state=present).
returned: when O(state=present) returned: when O(state=present)
@ -133,7 +132,7 @@ data:
"id": "10cb0b9a-80f6-4830-abd7-a31cd828b5e9" "id": "10cb0b9a-80f6-4830-abd7-a31cd828b5e9"
} }
} }
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway, payload_from_object
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_server_info module: scaleway_server_info
short_description: Gather information about the Scaleway servers available short_description: Gather information about the Scaleway servers available
description: description:
@ -37,9 +36,9 @@ options:
- EMEA-FR-PAR2 - EMEA-FR-PAR2
- waw1 - waw1
- EMEA-PL-WAW1 - EMEA-PL-WAW1
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Gather Scaleway servers information - name: Gather Scaleway servers information
community.general.scaleway_server_info: community.general.scaleway_server_info:
region: par1 region: par1
@ -47,14 +46,13 @@ EXAMPLES = r'''
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_server_info }}" msg: "{{ result.scaleway_server_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_server_info: scaleway_server_info:
description: description:
- Response from Scaleway API. - Response from Scaleway API.
- "For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)." - 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/).'
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -157,7 +155,7 @@ scaleway_server_info:
} }
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_snapshot_info module: scaleway_snapshot_info
short_description: Gather information about the Scaleway snapshots available short_description: Gather information about the Scaleway snapshots available
description: description:
@ -37,9 +36,9 @@ options:
- EMEA-FR-PAR2 - EMEA-FR-PAR2
- waw1 - waw1
- EMEA-PL-WAW1 - EMEA-PL-WAW1
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Gather Scaleway snapshots information - name: Gather Scaleway snapshots information
community.general.scaleway_snapshot_info: community.general.scaleway_snapshot_info:
region: par1 region: par1
@ -47,14 +46,13 @@ EXAMPLES = r'''
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_snapshot_info }}" msg: "{{ result.scaleway_snapshot_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_snapshot_info: scaleway_snapshot_info:
description: description:
- Response from Scaleway API. - Response from Scaleway API.
- "For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)." - 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/).'
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -75,7 +73,7 @@ scaleway_snapshot_info:
"volume_type": "l_ssd" "volume_type": "l_ssd"
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (

View File

@ -13,16 +13,15 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_sshkey module: scaleway_sshkey
short_description: Scaleway SSH keys management module short_description: Scaleway SSH keys management module
author: Remy Leone (@remyleone) author: Remy Leone (@remyleone)
description: description:
- "This module manages SSH keys on Scaleway account U(https://developer.scaleway.com)." - This module manages SSH keys on Scaleway account (U(https://developer.scaleway.com)).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
@ -50,9 +49,9 @@ options:
- Scaleway API URL. - Scaleway API URL.
default: 'https://account.scaleway.com' default: 'https://account.scaleway.com'
aliases: ['base_url'] aliases: ['base_url']
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: "Add SSH key" - name: "Add SSH key"
community.general.scaleway_sshkey: community.general.scaleway_sshkey:
ssh_pub_key: "ssh-rsa AAAA..." ssh_pub_key: "ssh-rsa AAAA..."
@ -68,9 +67,9 @@ EXAMPLES = '''
ssh_pub_key: "ssh-rsa AAAA..." ssh_pub_key: "ssh-rsa AAAA..."
state: "present" state: "present"
oauth_token: "6ecd2c9b-6f4f-44d4-a187-61a92078d08c" oauth_token: "6ecd2c9b-6f4f-44d4-a187-61a92078d08c"
''' """
RETURN = ''' RETURN = r"""
data: data:
description: This is only present when O(state=present). description: This is only present when O(state=present).
returned: when O(state=present) returned: when O(state=present)
@ -80,7 +79,7 @@ data:
{"key": "ssh-rsa AAAA...."} {"key": "ssh-rsa AAAA...."}
] ]
} }
''' """
from ansible.module_utils.basic import AnsibleModule, env_fallback from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible_collections.community.general.plugins.module_utils.scaleway import scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import scaleway_argument_spec, Scaleway

View File

@ -13,8 +13,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_user_data module: scaleway_user_data
short_description: Scaleway user_data management module short_description: Scaleway user_data management module
author: Remy Leone (@remyleone) author: Remy Leone (@remyleone)
@ -22,8 +21,8 @@ description:
- This module manages user_data on compute instances on Scaleway. - This module manages user_data on compute instances on Scaleway.
- It can be used to configure cloud-init for instance. - It can be used to configure cloud-init for instance.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
@ -60,19 +59,19 @@ options:
- EMEA-FR-PAR2 - EMEA-FR-PAR2
- waw1 - waw1
- EMEA-PL-WAW1 - EMEA-PL-WAW1
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Update the cloud-init - name: Update the cloud-init
community.general.scaleway_user_data: community.general.scaleway_user_data:
server_id: '5a33b4ab-57dd-4eb6-8b0a-d95eb63492ce' server_id: '5a33b4ab-57dd-4eb6-8b0a-d95eb63492ce'
region: ams1 region: ams1
user_data: user_data:
cloud-init: 'final_message: "Hello World!"' cloud-init: 'final_message: "Hello World!"'
''' """
RETURN = ''' RETURN = r"""
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway

View File

@ -12,16 +12,15 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: scaleway_volume module: scaleway_volume
short_description: Scaleway volumes management module short_description: Scaleway volumes management module
author: Henryk Konsek (@hekonsek) author: Henryk Konsek (@hekonsek)
description: description:
- "This module manages volumes on Scaleway account U(https://developer.scaleway.com)." - This module manages volumes on Scaleway account U(https://developer.scaleway.com).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.scaleway - community.general.scaleway
- community.general.attributes - community.general.attributes
attributes: attributes:
check_mode: check_mode:
@ -74,9 +73,9 @@ options:
type: str type: str
description: description:
- Type of the volume (for example 'l_ssd'). - Type of the volume (for example 'l_ssd').
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create 10GB volume - name: Create 10GB volume
community.general.scaleway_volume: community.general.scaleway_volume:
name: my-volume name: my-volume
@ -92,9 +91,9 @@ EXAMPLES = '''
name: my-volume name: my-volume
state: absent state: absent
region: par1 region: par1
''' """
RETURN = ''' RETURN = r"""
data: data:
description: This is only present when O(state=present). description: This is only present when O(state=present).
returned: when O(state=present) returned: when O(state=present)
@ -110,7 +109,7 @@ data:
"volume_type": "l_ssd" "volume_type": "l_ssd"
} }
} }
''' """
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -8,8 +8,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: scaleway_volume_info module: scaleway_volume_info
short_description: Gather information about the Scaleway volumes available short_description: Gather information about the Scaleway volumes available
description: description:
@ -37,9 +36,9 @@ options:
- EMEA-FR-PAR2 - EMEA-FR-PAR2
- waw1 - waw1
- EMEA-PL-WAW1 - EMEA-PL-WAW1
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Gather Scaleway volumes information - name: Gather Scaleway volumes information
community.general.scaleway_volume_info: community.general.scaleway_volume_info:
region: par1 region: par1
@ -47,14 +46,13 @@ EXAMPLES = r'''
- ansible.builtin.debug: - ansible.builtin.debug:
msg: "{{ result.scaleway_volume_info }}" msg: "{{ result.scaleway_volume_info }}"
''' """
RETURN = r''' RETURN = r"""
---
scaleway_volume_info: scaleway_volume_info:
description: description:
- Response from Scaleway API. - Response from Scaleway API.
- "For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/)." - 'For more details please refer to: U(https://developers.scaleway.com/en/products/instance/api/).'
returned: success returned: success
type: list type: list
elements: dict elements: dict
@ -73,7 +71,7 @@ scaleway_volume_info:
"volume_type": "l_ssd" "volume_type": "l_ssd"
} }
] ]
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.scaleway import ( from ansible_collections.community.general.plugins.module_utils.scaleway import (