diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..2bc7f9b --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,18 @@ +name: Ruff +on: + pull_request: +jobs: + format: + name: Format + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v2 + with: + args: "format --check" + check: + name: Check + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v2 diff --git a/plugins/inventory/scaleway.py b/plugins/inventory/scaleway.py index 97740d7..9239528 100644 --- a/plugins/inventory/scaleway.py +++ b/plugins/inventory/scaleway.py @@ -8,91 +8,6 @@ __metaclass__ = type -DOCUMENTATION = r""" -name: scaleway -author: - - Nathanael Demacon (@quantumsheep) -short_description: Scaleway inventory source -version_added: "1.0.0" -requirements: - - scaleway >= 0.6.0 -description: - - Scaleway inventory plugin. - - Uses configuration file that ends with '(scaleway|scw).(yaml|yml)'. -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - constructed - - inventory_cache -options: - plugin: - description: - - The name of the Scaleway Inventory Plugin, this should always be C(scaleway.scaleway.scaleway). - required: true - choices: ['scaleway.scaleway.scaleway'] - zones: - description: - - List of zones to filter on. - type: list - elements: str - default: - - fr-par-1 - - fr-par-2 - - fr-par-3 - - nl-ams-1 - - nl-ams-2 - - pl-waw-1 - - pl-waw-2 - tags: - description: - - List of tags to filter on. - type: list - elements: str - default: [] - hostnames: - description: List of preference about what to use as an hostname. - type: list - elements: str - default: - - public_ipv4 - choices: - - public_ipv4 - - private_ipv4 - - public_ipv6 - - hostname - - id - variables: - description: - - "Variables mapping to apply to hosts in the format destination_variable: host_variable." - - "You can use the following host variables:" - - " - C(id): The server id." - - " - C(tags): The server tags." - - " - C(zone): The server zone." - - " - C(state): The server state." - - " - C(hostname): The server hostname." - - " - C(public_ipv4): The server public ipv4." - - " - C(private_ipv4): The server private ipv4." - - " - C(public_ipv6): The server public ipv6." - - " - C(public_dns): The server public dns." - - " - C(private_dns): The server private dns." - - "" - - "If the variable is not found, the host will be ignored." - type: dict -""" - -EXAMPLES = r""" -plugin: scaleway.scaleway.scaleway -access_key: -secret_key: -api_url: https://api.scaleway.com -regions: - - fr-par-2 - - nl-ams-1 -tags: - - dev -variables: - ansible_host: public_ipv4 -""" - from dataclasses import dataclass, field from types import SimpleNamespace @@ -369,8 +284,12 @@ def _get_dedibox(self, client: "Client", filters: _Filters) -> List[_Host]: results: List[_Host] = [] for server in servers: - public_ipv4 = filter(lambda ip: ip.version == IPVersion.IPV4, server.interfaces.ips) - public_ipv6 = filter(lambda ip: ip.version == IPVersion.IPV6, server.interfaces.ips) + public_ipv4 = filter( + lambda ip: ip.version == IPVersion.IPV4, server.interfaces.ips + ) + public_ipv6 = filter( + lambda ip: ip.version == IPVersion.IPV6, server.interfaces.ips + ) public_ipv4 = next(public_ipv4, None) public_ipv6 = next(public_ipv6, None) diff --git a/plugins/inventory/scaleway.yml b/plugins/inventory/scaleway.yml new file mode 100644 index 0000000..850f39d --- /dev/null +++ b/plugins/inventory/scaleway.yml @@ -0,0 +1,82 @@ +DOCUMENTATION: + name: scaleway + author: + - Nathanael Demacon (@quantumsheep) + short_description: Scaleway inventory source + version_added: "1.0.0" + requirements: + - scaleway >= 0.6.0 + description: + - Scaleway inventory plugin. + - Uses configuration file that ends with '(scaleway|scw).(yaml|yml)'. + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - constructed + - inventory_cache + options: + plugin: + description: + - The name of the Scaleway Inventory Plugin, this should always be C(scaleway.scaleway.scaleway). + required: true + choices: ['scaleway.scaleway.scaleway'] + zones: + description: + - List of zones to filter on. + type: list + elements: str + default: + - fr-par-1 + - fr-par-2 + - fr-par-3 + - nl-ams-1 + - nl-ams-2 + - pl-waw-1 + - pl-waw-2 + tags: + description: + - List of tags to filter on. + type: list + elements: str + default: [] + hostnames: + description: List of preference about what to use as an hostname. + type: list + elements: str + default: + - public_ipv4 + choices: + - public_ipv4 + - private_ipv4 + - public_ipv6 + - hostname + - id + variables: + description: + - "Variables mapping to apply to hosts in the format destination_variable: host_variable." + - "You can use the following host variables:" + - " - C(id): The server id." + - " - C(tags): The server tags." + - " - C(zone): The server zone." + - " - C(state): The server state." + - " - C(hostname): The server hostname." + - " - C(public_ipv4): The server public ipv4." + - " - C(private_ipv4): The server private ipv4." + - " - C(public_ipv6): The server public ipv6." + - " - C(public_dns): The server public dns." + - " - C(private_dns): The server private dns." + - "" + - "If the variable is not found, the host will be ignored." + type: dict + +EXAMPLES: + - plugin: scaleway.scaleway.scaleway + access_key: + secret_key: + api_url: https://api.scaleway.com + regions: + - fr-par-2 + - nl-ams-1 + tags: + - dev + variables: + ansible_host: public_ipv4 diff --git a/plugins/modules/scaleway_account_project.py b/plugins/modules/scaleway_account_project.py index c26810d..b691baa 100644 --- a/plugins/modules/scaleway_account_project.py +++ b/plugins/modules/scaleway_account_project.py @@ -7,69 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_account_project -short_description: Manage Scaleway account's project -description: - - This module can be used to manage Scaleway account's project. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - project_id: - description: project_id - type: str - required: false - name: - description: name - type: str - required: true - organization_id: - description: organization_id - type: str - required: false - description: - description: description - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a project - scaleway.scaleway.scaleway_account_project: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - name: "aaaaaa" -""" - -RETURN = r""" ---- -project: - description: The project information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - description: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_account_project.yml b/plugins/modules/scaleway_account_project.yml new file mode 100644 index 0000000..eac715e --- /dev/null +++ b/plugins/modules/scaleway_account_project.yml @@ -0,0 +1,58 @@ +DOCUMENTATION: + module: scaleway_account_project + short_description: Manage Scaleway account's project + description: + - This module can be used to manage Scaleway account's project. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + project_id: + description: project_id + type: str + required: false + name: + description: name + type: str + required: true + organization_id: + description: organization_id + type: str + required: false + description: + description: description + type: str + required: false + +EXAMPLES: + - name: Create a project + scaleway.scaleway.scaleway_account_project: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + name: "aaaaaa" + +RETURN: + project: + description: The project information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + description: "aaaaaa" diff --git a/plugins/modules/scaleway_applesilicon_server.py b/plugins/modules/scaleway_applesilicon_server.py index 8d4dd3c..bf3e94e 100644 --- a/plugins/modules/scaleway_applesilicon_server.py +++ b/plugins/modules/scaleway_applesilicon_server.py @@ -7,79 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_applesilicon_server -short_description: Manage Scaleway applesilicon's server -description: - - This module can be used to manage Scaleway applesilicon's server. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - server_id: - description: server_id - type: str - required: false - type_: - description: type_ - type: str - required: true - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - project_id: - description: project_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a server - scaleway.scaleway.scaleway_applesilicon_server: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - type_: "aaaaaa" -""" - -RETURN = r""" ---- -server: - description: The server information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - type_: "aaaaaa" - name: "aaaaaa" - project_id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - ip: "aaaaaa" - vnc_url: "aaaaaa" - status: starting - created_at: "aaaaaa" - updated_at: "aaaaaa" - deletable_at: "aaaaaa" - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_applesilicon_server.yml b/plugins/modules/scaleway_applesilicon_server.yml new file mode 100644 index 0000000..f19fba1 --- /dev/null +++ b/plugins/modules/scaleway_applesilicon_server.yml @@ -0,0 +1,68 @@ +DOCUMENTATION: + module: scaleway_applesilicon_server + short_description: Manage Scaleway applesilicon's server + description: + - This module can be used to manage Scaleway applesilicon's server. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + server_id: + description: server_id + type: str + required: false + type_: + description: type_ + type: str + required: true + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + project_id: + description: project_id + type: str + required: false + +EXAMPLES: + - name: Create a server + scaleway.scaleway.scaleway_applesilicon_server: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + type_: "aaaaaa" + +RETURN: + server: + description: The server information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + type_: "aaaaaa" + name: "aaaaaa" + project_id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + ip: "aaaaaa" + vnc_url: "aaaaaa" + status: starting + created_at: "aaaaaa" + updated_at: "aaaaaa" + deletable_at: "aaaaaa" + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_baremetal_server.py b/plugins/modules/scaleway_baremetal_server.py index e5dd2d8..b26a652 100644 --- a/plugins/modules/scaleway_baremetal_server.py +++ b/plugins/modules/scaleway_baremetal_server.py @@ -7,120 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_baremetal_server -short_description: Manage Scaleway baremetal's server -description: - - This module can be used to manage Scaleway baremetal's server. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - server_id: - description: server_id - type: str - required: false - offer_id: - description: offer_id - type: str - required: true - name: - description: name - type: str - required: true - description: - description: description - type: str - required: true - zone: - description: zone - type: str - required: false - organization_id: - description: organization_id - type: str - required: false - project_id: - description: project_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - install: - description: install - type: dict - required: false - option_ids: - description: option_ids - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a server - scaleway.scaleway.scaleway_baremetal_server: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - offer_id: "aaaaaa" - name: "aaaaaa" - description: "aaaaaa" -""" - -RETURN = r""" ---- -server: - description: The server information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - updated_at: "aaaaaa" - created_at: "aaaaaa" - status: delivering - offer_id: 00000000-0000-0000-0000-000000000000 - offer_name: "aaaaaa" - tags: - - aaaaaa - - bbbbbb - ips: - - aaaaaa - - bbbbbb - domain: "aaaaaa" - boot_type: normal - zone: "aaaaaa" - install: - aaaaaa: bbbbbb - cccccc: dddddd - ping_status: ping_status_up - options: - - aaaaaa - - bbbbbb - rescue_server: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_baremetal_server.yml b/plugins/modules/scaleway_baremetal_server.yml new file mode 100644 index 0000000..4c1485e --- /dev/null +++ b/plugins/modules/scaleway_baremetal_server.yml @@ -0,0 +1,109 @@ +DOCUMENTATION: + module: scaleway_baremetal_server + short_description: Manage Scaleway baremetal's server + description: + - This module can be used to manage Scaleway baremetal's server. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + server_id: + description: server_id + type: str + required: false + offer_id: + description: offer_id + type: str + required: true + name: + description: name + type: str + required: true + description: + description: description + type: str + required: true + zone: + description: zone + type: str + required: false + organization_id: + description: organization_id + type: str + required: false + project_id: + description: project_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + install: + description: install + type: dict + required: false + option_ids: + description: option_ids + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a server + scaleway.scaleway.scaleway_baremetal_server: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + offer_id: "aaaaaa" + name: "aaaaaa" + description: "aaaaaa" + +RETURN: + server: + description: The server information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + updated_at: "aaaaaa" + created_at: "aaaaaa" + status: delivering + offer_id: 00000000-0000-0000-0000-000000000000 + offer_name: "aaaaaa" + tags: + - aaaaaa + - bbbbbb + ips: + - aaaaaa + - bbbbbb + domain: "aaaaaa" + boot_type: normal + zone: "aaaaaa" + install: + aaaaaa: bbbbbb + cccccc: dddddd + ping_status: ping_status_up + options: + - aaaaaa + - bbbbbb + rescue_server: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_container.py b/plugins/modules/scaleway_container.py index 7037082..4f028a7 100644 --- a/plugins/modules/scaleway_container.py +++ b/plugins/modules/scaleway_container.py @@ -7,160 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_container -short_description: Manage Scaleway container's container -description: - - This module can be used to manage Scaleway container's container. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - container_id: - description: container_id - type: str - required: false - namespace_id: - description: namespace_id - type: str - required: true - privacy: - description: privacy - type: str - required: true - choices: - - unknown_privacy - - public - - private - protocol: - description: protocol - type: str - required: true - choices: - - unknown_protocol - - http1 - - h2c - http_option: - description: http_option - type: str - required: true - choices: - - unknown_http_option - - enabled - - redirected - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - environment_variables: - description: environment_variables - type: dict - required: false - min_scale: - description: min_scale - type: int - required: false - max_scale: - description: max_scale - type: int - required: false - memory_limit: - description: memory_limit - type: int - required: false - timeout: - description: timeout - type: str - required: false - description: - description: description - type: str - required: false - registry_image: - description: registry_image - type: str - required: false - max_concurrency: - description: max_concurrency - type: int - required: false - port: - description: port - type: int - required: false - secret_environment_variables: - description: secret_environment_variables - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a container - scaleway.scaleway.scaleway_container: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - namespace_id: "aaaaaa" - privacy: "aaaaaa" - protocol: "aaaaaa" - http_option: "aaaaaa" -""" - -RETURN = r""" ---- -container: - description: The container information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - namespace_id: 00000000-0000-0000-0000-000000000000 - status: ready - environment_variables: - aaaaaa: bbbbbb - cccccc: dddddd - min_scale: 3 - max_scale: 3 - memory_limit: 3 - cpu_limit: 3 - timeout: "aaaaaa" - error_message: "aaaaaa" - privacy: public - description: "aaaaaa" - registry_image: "aaaaaa" - max_concurrency: 3 - domain_name: "aaaaaa" - protocol: http1 - port: 3 - secret_environment_variables: - - aaaaaa - - bbbbbb - http_option: enabled - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_container.yml b/plugins/modules/scaleway_container.yml new file mode 100644 index 0000000..803d10f --- /dev/null +++ b/plugins/modules/scaleway_container.yml @@ -0,0 +1,149 @@ +DOCUMENTATION: + module: scaleway_container + short_description: Manage Scaleway container's container + description: + - This module can be used to manage Scaleway container's container. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + container_id: + description: container_id + type: str + required: false + namespace_id: + description: namespace_id + type: str + required: true + privacy: + description: privacy + type: str + required: true + choices: + - unknown_privacy + - public + - private + protocol: + description: protocol + type: str + required: true + choices: + - unknown_protocol + - http1 + - h2c + http_option: + description: http_option + type: str + required: true + choices: + - unknown_http_option + - enabled + - redirected + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + environment_variables: + description: environment_variables + type: dict + required: false + min_scale: + description: min_scale + type: int + required: false + max_scale: + description: max_scale + type: int + required: false + memory_limit: + description: memory_limit + type: int + required: false + timeout: + description: timeout + type: str + required: false + description: + description: description + type: str + required: false + registry_image: + description: registry_image + type: str + required: false + max_concurrency: + description: max_concurrency + type: int + required: false + port: + description: port + type: int + required: false + secret_environment_variables: + description: secret_environment_variables + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a container + scaleway.scaleway.scaleway_container: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + namespace_id: "aaaaaa" + privacy: "aaaaaa" + protocol: "aaaaaa" + http_option: "aaaaaa" + +RETURN: + container: + description: The container information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + namespace_id: 00000000-0000-0000-0000-000000000000 + status: ready + environment_variables: + aaaaaa: bbbbbb + cccccc: dddddd + min_scale: 3 + max_scale: 3 + memory_limit: 3 + cpu_limit: 3 + timeout: "aaaaaa" + error_message: "aaaaaa" + privacy: public + description: "aaaaaa" + registry_image: "aaaaaa" + max_concurrency: 3 + domain_name: "aaaaaa" + protocol: http1 + port: 3 + secret_environment_variables: + - aaaaaa + - bbbbbb + http_option: enabled + region: fr-par diff --git a/plugins/modules/scaleway_container_cron.py b/plugins/modules/scaleway_container_cron.py index cc237af..01811c9 100644 --- a/plugins/modules/scaleway_container_cron.py +++ b/plugins/modules/scaleway_container_cron.py @@ -7,84 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_container_cron -short_description: Manage Scaleway container's cron -description: - - This module can be used to manage Scaleway container's cron. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - cron_id: - description: cron_id - type: str - required: false - container_id: - description: container_id - type: str - required: true - schedule: - description: schedule - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - args: - description: args - type: dict - required: false - name: - description: name - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a cron - scaleway.scaleway.scaleway_container_cron: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - container_id: "aaaaaa" - schedule: "aaaaaa" -""" - -RETURN = r""" ---- -cron: - description: The cron information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - container_id: 00000000-0000-0000-0000-000000000000 - schedule: "aaaaaa" - args: - aaaaaa: bbbbbb - cccccc: dddddd - status: ready - name: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_container_cron.yml b/plugins/modules/scaleway_container_cron.yml new file mode 100644 index 0000000..01daf1d --- /dev/null +++ b/plugins/modules/scaleway_container_cron.yml @@ -0,0 +1,73 @@ +DOCUMENTATION: + module: scaleway_container_cron + short_description: Manage Scaleway container's cron + description: + - This module can be used to manage Scaleway container's cron. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + cron_id: + description: cron_id + type: str + required: false + container_id: + description: container_id + type: str + required: true + schedule: + description: schedule + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + args: + description: args + type: dict + required: false + name: + description: name + type: str + required: false + +EXAMPLES: + - name: Create a cron + scaleway.scaleway.scaleway_container_cron: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + container_id: "aaaaaa" + schedule: "aaaaaa" + +RETURN: + cron: + description: The cron information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + container_id: 00000000-0000-0000-0000-000000000000 + schedule: "aaaaaa" + args: + aaaaaa: bbbbbb + cccccc: dddddd + status: ready + name: "aaaaaa" diff --git a/plugins/modules/scaleway_container_domain.py b/plugins/modules/scaleway_container_domain.py index f7213a0..6cc0ccf 100644 --- a/plugins/modules/scaleway_container_domain.py +++ b/plugins/modules/scaleway_container_domain.py @@ -7,74 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_container_domain -short_description: Manage Scaleway container's domain -description: - - This module can be used to manage Scaleway container's domain. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - domain_id: - description: domain_id - type: str - required: false - hostname: - description: hostname - type: str - required: true - container_id: - description: container_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw -""" - -EXAMPLES = r""" -- name: Create a domain - scaleway.scaleway.scaleway_container_domain: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - hostname: "aaaaaa" - container_id: "aaaaaa" -""" - -RETURN = r""" ---- -domain: - description: The domain information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - hostname: "aaaaaa" - container_id: 00000000-0000-0000-0000-000000000000 - url: "aaaaaa" - status: ready - error_message: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_container_domain.yml b/plugins/modules/scaleway_container_domain.yml new file mode 100644 index 0000000..6195680 --- /dev/null +++ b/plugins/modules/scaleway_container_domain.yml @@ -0,0 +1,63 @@ +DOCUMENTATION: + module: scaleway_container_domain + short_description: Manage Scaleway container's domain + description: + - This module can be used to manage Scaleway container's domain. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + domain_id: + description: domain_id + type: str + required: false + hostname: + description: hostname + type: str + required: true + container_id: + description: container_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + +EXAMPLES: + - name: Create a domain + scaleway.scaleway.scaleway_container_domain: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + hostname: "aaaaaa" + container_id: "aaaaaa" + +RETURN: + domain: + description: The domain information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + hostname: "aaaaaa" + container_id: 00000000-0000-0000-0000-000000000000 + url: "aaaaaa" + status: ready + error_message: "aaaaaa" diff --git a/plugins/modules/scaleway_container_namespace.py b/plugins/modules/scaleway_container_namespace.py index 8ae17c2..2b6d3f5 100644 --- a/plugins/modules/scaleway_container_namespace.py +++ b/plugins/modules/scaleway_container_namespace.py @@ -7,95 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_container_namespace -short_description: Manage Scaleway container's namespace -description: - - This module can be used to manage Scaleway container's namespace. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - namespace_id: - description: namespace_id - type: str - required: false - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - environment_variables: - description: environment_variables - type: dict - required: false - project_id: - description: project_id - type: str - required: false - description: - description: description - type: str - required: false - secret_environment_variables: - description: secret_environment_variables - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a namespace - scaleway.scaleway.scaleway_container_namespace: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -namespace: - description: The namespace information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - environment_variables: - aaaaaa: bbbbbb - cccccc: dddddd - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - status: ready - registry_namespace_id: 00000000-0000-0000-0000-000000000000 - error_message: "aaaaaa" - registry_endpoint: "aaaaaa" - description: "aaaaaa" - secret_environment_variables: - - aaaaaa - - bbbbbb - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_container_namespace.yml b/plugins/modules/scaleway_container_namespace.yml new file mode 100644 index 0000000..05408e8 --- /dev/null +++ b/plugins/modules/scaleway_container_namespace.yml @@ -0,0 +1,84 @@ +DOCUMENTATION: + module: scaleway_container_namespace + short_description: Manage Scaleway container's namespace + description: + - This module can be used to manage Scaleway container's namespace. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + namespace_id: + description: namespace_id + type: str + required: false + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + environment_variables: + description: environment_variables + type: dict + required: false + project_id: + description: project_id + type: str + required: false + description: + description: description + type: str + required: false + secret_environment_variables: + description: secret_environment_variables + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a namespace + scaleway.scaleway.scaleway_container_namespace: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + +RETURN: + namespace: + description: The namespace information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + environment_variables: + aaaaaa: bbbbbb + cccccc: dddddd + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + status: ready + registry_namespace_id: 00000000-0000-0000-0000-000000000000 + error_message: "aaaaaa" + registry_endpoint: "aaaaaa" + description: "aaaaaa" + secret_environment_variables: + - aaaaaa + - bbbbbb + region: fr-par diff --git a/plugins/modules/scaleway_container_token.py b/plugins/modules/scaleway_container_token.py index 0a95200..4c5c9b3 100644 --- a/plugins/modules/scaleway_container_token.py +++ b/plugins/modules/scaleway_container_token.py @@ -7,82 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_container_token -short_description: Manage Scaleway container's token -description: - - This module can be used to manage Scaleway container's token. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - token_id: - description: token_id - type: str - required: false - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - container_id: - description: container_id - type: str - required: false - namespace_id: - description: namespace_id - type: str - required: false - description: - description: description - type: str - required: false - expires_at: - description: expires_at - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a token - scaleway.scaleway.scaleway_container_token: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -token: - description: The token information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - token: "aaaaaa" - container_id: 00000000-0000-0000-0000-000000000000 - namespace_id: 00000000-0000-0000-0000-000000000000 - public_key: "aaaaaa" - status: ready - description: "aaaaaa" - expires_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_container_token.yml b/plugins/modules/scaleway_container_token.yml new file mode 100644 index 0000000..28f2372 --- /dev/null +++ b/plugins/modules/scaleway_container_token.yml @@ -0,0 +1,71 @@ +DOCUMENTATION: + module: scaleway_container_token + short_description: Manage Scaleway container's token + description: + - This module can be used to manage Scaleway container's token. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + token_id: + description: token_id + type: str + required: false + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + container_id: + description: container_id + type: str + required: false + namespace_id: + description: namespace_id + type: str + required: false + description: + description: description + type: str + required: false + expires_at: + description: expires_at + type: str + required: false + +EXAMPLES: + - name: Create a token + scaleway.scaleway.scaleway_container_token: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + +RETURN: + token: + description: The token information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + token: "aaaaaa" + container_id: 00000000-0000-0000-0000-000000000000 + namespace_id: 00000000-0000-0000-0000-000000000000 + public_key: "aaaaaa" + status: ready + description: "aaaaaa" + expires_at: "aaaaaa" diff --git a/plugins/modules/scaleway_domain_ssl_certificate.py b/plugins/modules/scaleway_domain_ssl_certificate.py index 1d67749..309e3d5 100644 --- a/plugins/modules/scaleway_domain_ssl_certificate.py +++ b/plugins/modules/scaleway_domain_ssl_certificate.py @@ -7,65 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_domain_ssl_certificate -short_description: Manage Scaleway domain's ssl_certificate -description: - - This module can be used to manage Scaleway domain's ssl_certificate. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - dns_zone: - description: dns_zone - type: str - required: true - alternative_dns_zones: - description: alternative_dns_zones - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a ssl_certificate - scaleway.scaleway.scaleway_domain_ssl_certificate: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - dns_zone: "aaaaaa" -""" - -RETURN = r""" ---- -ssl_certificate: - description: The ssl_certificate information - returned: when I(state=present) - type: dict - sample: - dns_zone: "aaaaaa" - alternative_dns_zones: - - aaaaaa - - bbbbbb - status: new - private_key: "aaaaaa" - certificate_chain: "aaaaaa" - created_at: "aaaaaa" - expired_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_domain_ssl_certificate.yml b/plugins/modules/scaleway_domain_ssl_certificate.yml new file mode 100644 index 0000000..c50b170 --- /dev/null +++ b/plugins/modules/scaleway_domain_ssl_certificate.yml @@ -0,0 +1,54 @@ +DOCUMENTATION: + module: scaleway_domain_ssl_certificate + short_description: Manage Scaleway domain's ssl_certificate + description: + - This module can be used to manage Scaleway domain's ssl_certificate. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + dns_zone: + description: dns_zone + type: str + required: true + alternative_dns_zones: + description: alternative_dns_zones + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a ssl_certificate + scaleway.scaleway.scaleway_domain_ssl_certificate: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + dns_zone: "aaaaaa" + +RETURN: + ssl_certificate: + description: The ssl_certificate information + returned: when I(state=present) + type: dict + sample: + dns_zone: "aaaaaa" + alternative_dns_zones: + - aaaaaa + - bbbbbb + status: new + private_key: "aaaaaa" + certificate_chain: "aaaaaa" + created_at: "aaaaaa" + expired_at: "aaaaaa" diff --git a/plugins/modules/scaleway_flexibleip_flexible_ip.py b/plugins/modules/scaleway_flexibleip_flexible_ip.py index 71edf0c..7fe1a3a 100644 --- a/plugins/modules/scaleway_flexibleip_flexible_ip.py +++ b/plugins/modules/scaleway_flexibleip_flexible_ip.py @@ -7,98 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_flexibleip_flexible_ip -short_description: Manage Scaleway flexibleip's flexible_ip -description: - - This module can be used to manage Scaleway flexibleip's flexible_ip. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - fip_id: - description: fip_id - type: str - required: false - description: - description: description - type: str - required: true - is_ipv6: - description: is_ipv6 - type: bool - required: true - zone: - description: zone - type: str - required: false - project_id: - description: project_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - server_id: - description: server_id - type: str - required: false - reverse: - description: reverse - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a flexible_ip - scaleway.scaleway.scaleway_flexibleip_flexible_ip: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" - is_ipv6: true -""" - -RETURN = r""" ---- -flexible_ip: - description: The flexible_ip information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - description: "aaaaaa" - tags: - - aaaaaa - - bbbbbb - updated_at: "aaaaaa" - created_at: "aaaaaa" - status: ready - ip_address: "aaaaaa" - mac_address: - aaaaaa: bbbbbb - cccccc: dddddd - server_id: 00000000-0000-0000-0000-000000000000 - reverse: "aaaaaa" - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_flexibleip_flexible_ip.yml b/plugins/modules/scaleway_flexibleip_flexible_ip.yml new file mode 100644 index 0000000..24e409b --- /dev/null +++ b/plugins/modules/scaleway_flexibleip_flexible_ip.yml @@ -0,0 +1,87 @@ +DOCUMENTATION: + module: scaleway_flexibleip_flexible_ip + short_description: Manage Scaleway flexibleip's flexible_ip + description: + - This module can be used to manage Scaleway flexibleip's flexible_ip. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + fip_id: + description: fip_id + type: str + required: false + description: + description: description + type: str + required: true + is_ipv6: + description: is_ipv6 + type: bool + required: true + zone: + description: zone + type: str + required: false + project_id: + description: project_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + server_id: + description: server_id + type: str + required: false + reverse: + description: reverse + type: str + required: false + +EXAMPLES: + - name: Create a flexible_ip + scaleway.scaleway.scaleway_flexibleip_flexible_ip: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + is_ipv6: true + +RETURN: + flexible_ip: + description: The flexible_ip information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + description: "aaaaaa" + tags: + - aaaaaa + - bbbbbb + updated_at: "aaaaaa" + created_at: "aaaaaa" + status: ready + ip_address: "aaaaaa" + mac_address: + aaaaaa: bbbbbb + cccccc: dddddd + server_id: 00000000-0000-0000-0000-000000000000 + reverse: "aaaaaa" + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_function.py b/plugins/modules/scaleway_function.py index 179a3ab..a5997b8 100644 --- a/plugins/modules/scaleway_function.py +++ b/plugins/modules/scaleway_function.py @@ -7,171 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_function -short_description: Manage Scaleway function's function -description: - - This module can be used to manage Scaleway function's function. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - function_id: - description: function_id - type: str - required: false - namespace_id: - description: namespace_id - type: str - required: true - runtime: - description: runtime - type: str - required: true - choices: - - unknown_runtime - - golang - - python - - python3 - - node8 - - node10 - - node14 - - node16 - - node17 - - python37 - - python38 - - python39 - - python310 - - go113 - - go117 - - go118 - - node18 - - rust165 - - go119 - - python311 - - php82 - - node19 - - go120 - privacy: - description: privacy - type: str - required: true - choices: - - unknown_privacy - - public - - private - http_option: - description: http_option - type: str - required: true - choices: - - unknown_http_option - - enabled - - redirected - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - environment_variables: - description: environment_variables - type: dict - required: false - min_scale: - description: min_scale - type: int - required: false - max_scale: - description: max_scale - type: int - required: false - memory_limit: - description: memory_limit - type: int - required: false - timeout: - description: timeout - type: str - required: false - handler: - description: handler - type: str - required: false - description: - description: description - type: str - required: false - secret_environment_variables: - description: secret_environment_variables - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a function - scaleway.scaleway.scaleway_function: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - namespace_id: "aaaaaa" - runtime: "aaaaaa" - privacy: "aaaaaa" - http_option: "aaaaaa" -""" - -RETURN = r""" ---- -function: - description: The function information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - namespace_id: 00000000-0000-0000-0000-000000000000 - status: ready - environment_variables: - aaaaaa: bbbbbb - cccccc: dddddd - min_scale: 3 - max_scale: 3 - runtime: golang - memory_limit: 3 - cpu_limit: 3 - timeout: "aaaaaa" - handler: "aaaaaa" - error_message: "aaaaaa" - privacy: public - description: "aaaaaa" - domain_name: "aaaaaa" - secret_environment_variables: - - aaaaaa - - bbbbbb - region: fr-par - http_option: enabled - runtime_message: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_function.yml b/plugins/modules/scaleway_function.yml new file mode 100644 index 0000000..ec3284c --- /dev/null +++ b/plugins/modules/scaleway_function.yml @@ -0,0 +1,160 @@ +DOCUMENTATION: + module: scaleway_function + short_description: Manage Scaleway function's function + description: + - This module can be used to manage Scaleway function's function. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + function_id: + description: function_id + type: str + required: false + namespace_id: + description: namespace_id + type: str + required: true + runtime: + description: runtime + type: str + required: true + choices: + - unknown_runtime + - golang + - python + - python3 + - node8 + - node10 + - node14 + - node16 + - node17 + - python37 + - python38 + - python39 + - python310 + - go113 + - go117 + - go118 + - node18 + - rust165 + - go119 + - python311 + - php82 + - node19 + - go120 + privacy: + description: privacy + type: str + required: true + choices: + - unknown_privacy + - public + - private + http_option: + description: http_option + type: str + required: true + choices: + - unknown_http_option + - enabled + - redirected + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + environment_variables: + description: environment_variables + type: dict + required: false + min_scale: + description: min_scale + type: int + required: false + max_scale: + description: max_scale + type: int + required: false + memory_limit: + description: memory_limit + type: int + required: false + timeout: + description: timeout + type: str + required: false + handler: + description: handler + type: str + required: false + description: + description: description + type: str + required: false + secret_environment_variables: + description: secret_environment_variables + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a function + scaleway.scaleway.scaleway_function: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + namespace_id: "aaaaaa" + runtime: "aaaaaa" + privacy: "aaaaaa" + http_option: "aaaaaa" + +RETURN: + function: + description: The function information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + namespace_id: 00000000-0000-0000-0000-000000000000 + status: ready + environment_variables: + aaaaaa: bbbbbb + cccccc: dddddd + min_scale: 3 + max_scale: 3 + runtime: golang + memory_limit: 3 + cpu_limit: 3 + timeout: "aaaaaa" + handler: "aaaaaa" + error_message: "aaaaaa" + privacy: public + description: "aaaaaa" + domain_name: "aaaaaa" + secret_environment_variables: + - aaaaaa + - bbbbbb + region: fr-par + http_option: enabled + runtime_message: "aaaaaa" diff --git a/plugins/modules/scaleway_function_cron.py b/plugins/modules/scaleway_function_cron.py index c293368..3c05bed 100644 --- a/plugins/modules/scaleway_function_cron.py +++ b/plugins/modules/scaleway_function_cron.py @@ -7,84 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_function_cron -short_description: Manage Scaleway function's cron -description: - - This module can be used to manage Scaleway function's cron. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - cron_id: - description: cron_id - type: str - required: false - function_id: - description: function_id - type: str - required: true - schedule: - description: schedule - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - args: - description: args - type: dict - required: false - name: - description: name - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a cron - scaleway.scaleway.scaleway_function_cron: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - function_id: "aaaaaa" - schedule: "aaaaaa" -""" - -RETURN = r""" ---- -cron: - description: The cron information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - function_id: 00000000-0000-0000-0000-000000000000 - schedule: "aaaaaa" - args: - aaaaaa: bbbbbb - cccccc: dddddd - status: ready - name: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_function_cron.yml b/plugins/modules/scaleway_function_cron.yml new file mode 100644 index 0000000..74ce3b1 --- /dev/null +++ b/plugins/modules/scaleway_function_cron.yml @@ -0,0 +1,73 @@ +DOCUMENTATION: + module: scaleway_function_cron + short_description: Manage Scaleway function's cron + description: + - This module can be used to manage Scaleway function's cron. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + cron_id: + description: cron_id + type: str + required: false + function_id: + description: function_id + type: str + required: true + schedule: + description: schedule + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + args: + description: args + type: dict + required: false + name: + description: name + type: str + required: false + +EXAMPLES: + - name: Create a cron + scaleway.scaleway.scaleway_function_cron: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + function_id: "aaaaaa" + schedule: "aaaaaa" + +RETURN: + cron: + description: The cron information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + function_id: 00000000-0000-0000-0000-000000000000 + schedule: "aaaaaa" + args: + aaaaaa: bbbbbb + cccccc: dddddd + status: ready + name: "aaaaaa" diff --git a/plugins/modules/scaleway_function_domain.py b/plugins/modules/scaleway_function_domain.py index a3a7fa9..d9a4b80 100644 --- a/plugins/modules/scaleway_function_domain.py +++ b/plugins/modules/scaleway_function_domain.py @@ -7,74 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_function_domain -short_description: Manage Scaleway function's domain -description: - - This module can be used to manage Scaleway function's domain. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - domain_id: - description: domain_id - type: str - required: false - hostname: - description: hostname - type: str - required: true - function_id: - description: function_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw -""" - -EXAMPLES = r""" -- name: Create a domain - scaleway.scaleway.scaleway_function_domain: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - hostname: "aaaaaa" - function_id: "aaaaaa" -""" - -RETURN = r""" ---- -domain: - description: The domain information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - hostname: "aaaaaa" - function_id: 00000000-0000-0000-0000-000000000000 - url: "aaaaaa" - status: ready - error_message: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_function_domain.yml b/plugins/modules/scaleway_function_domain.yml new file mode 100644 index 0000000..1aa1b50 --- /dev/null +++ b/plugins/modules/scaleway_function_domain.yml @@ -0,0 +1,63 @@ +DOCUMENTATION: + module: scaleway_function_domain + short_description: Manage Scaleway function's domain + description: + - This module can be used to manage Scaleway function's domain. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + domain_id: + description: domain_id + type: str + required: false + hostname: + description: hostname + type: str + required: true + function_id: + description: function_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + +EXAMPLES: + - name: Create a domain + scaleway.scaleway.scaleway_function_domain: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + hostname: "aaaaaa" + function_id: "aaaaaa" + +RETURN: + domain: + description: The domain information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + hostname: "aaaaaa" + function_id: 00000000-0000-0000-0000-000000000000 + url: "aaaaaa" + status: ready + error_message: "aaaaaa" diff --git a/plugins/modules/scaleway_function_namespace.py b/plugins/modules/scaleway_function_namespace.py index 2649458..9061616 100644 --- a/plugins/modules/scaleway_function_namespace.py +++ b/plugins/modules/scaleway_function_namespace.py @@ -7,95 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_function_namespace -short_description: Manage Scaleway function's namespace -description: - - This module can be used to manage Scaleway function's namespace. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - namespace_id: - description: namespace_id - type: str - required: false - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - environment_variables: - description: environment_variables - type: dict - required: false - project_id: - description: project_id - type: str - required: false - description: - description: description - type: str - required: false - secret_environment_variables: - description: secret_environment_variables - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a namespace - scaleway.scaleway.scaleway_function_namespace: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -namespace: - description: The namespace information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - environment_variables: - aaaaaa: bbbbbb - cccccc: dddddd - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - status: ready - registry_namespace_id: 00000000-0000-0000-0000-000000000000 - error_message: "aaaaaa" - registry_endpoint: "aaaaaa" - description: "aaaaaa" - secret_environment_variables: - - aaaaaa - - bbbbbb - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_function_namespace.yml b/plugins/modules/scaleway_function_namespace.yml new file mode 100644 index 0000000..c8fec15 --- /dev/null +++ b/plugins/modules/scaleway_function_namespace.yml @@ -0,0 +1,84 @@ +DOCUMENTATION: + module: scaleway_function_namespace + short_description: Manage Scaleway function's namespace + description: + - This module can be used to manage Scaleway function's namespace. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + namespace_id: + description: namespace_id + type: str + required: false + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + environment_variables: + description: environment_variables + type: dict + required: false + project_id: + description: project_id + type: str + required: false + description: + description: description + type: str + required: false + secret_environment_variables: + description: secret_environment_variables + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a namespace + scaleway.scaleway.scaleway_function_namespace: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + +RETURN: + namespace: + description: The namespace information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + environment_variables: + aaaaaa: bbbbbb + cccccc: dddddd + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + status: ready + registry_namespace_id: 00000000-0000-0000-0000-000000000000 + error_message: "aaaaaa" + registry_endpoint: "aaaaaa" + description: "aaaaaa" + secret_environment_variables: + - aaaaaa + - bbbbbb + region: fr-par diff --git a/plugins/modules/scaleway_function_token.py b/plugins/modules/scaleway_function_token.py index 06d50aa..7cfe458 100644 --- a/plugins/modules/scaleway_function_token.py +++ b/plugins/modules/scaleway_function_token.py @@ -7,82 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_function_token -short_description: Manage Scaleway function's token -description: - - This module can be used to manage Scaleway function's token. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - token_id: - description: token_id - type: str - required: false - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - function_id: - description: function_id - type: str - required: false - namespace_id: - description: namespace_id - type: str - required: false - description: - description: description - type: str - required: false - expires_at: - description: expires_at - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a token - scaleway.scaleway.scaleway_function_token: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -token: - description: The token information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - token: "aaaaaa" - function_id: 00000000-0000-0000-0000-000000000000 - namespace_id: 00000000-0000-0000-0000-000000000000 - public_key: "aaaaaa" - status: ready - description: "aaaaaa" - expires_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_function_token.yml b/plugins/modules/scaleway_function_token.yml new file mode 100644 index 0000000..0f5ac0d --- /dev/null +++ b/plugins/modules/scaleway_function_token.yml @@ -0,0 +1,71 @@ +DOCUMENTATION: + module: scaleway_function_token + short_description: Manage Scaleway function's token + description: + - This module can be used to manage Scaleway function's token. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + token_id: + description: token_id + type: str + required: false + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + function_id: + description: function_id + type: str + required: false + namespace_id: + description: namespace_id + type: str + required: false + description: + description: description + type: str + required: false + expires_at: + description: expires_at + type: str + required: false + +EXAMPLES: + - name: Create a token + scaleway.scaleway.scaleway_function_token: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + +RETURN: + token: + description: The token information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + token: "aaaaaa" + function_id: 00000000-0000-0000-0000-000000000000 + namespace_id: 00000000-0000-0000-0000-000000000000 + public_key: "aaaaaa" + status: ready + description: "aaaaaa" + expires_at: "aaaaaa" diff --git a/plugins/modules/scaleway_function_trigger.py b/plugins/modules/scaleway_function_trigger.py index c8dde12..8bff5d0 100644 --- a/plugins/modules/scaleway_function_trigger.py +++ b/plugins/modules/scaleway_function_trigger.py @@ -7,101 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_function_trigger -short_description: Manage Scaleway function's trigger -description: - - This module can be used to manage Scaleway function's trigger. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - trigger_id: - description: trigger_id - type: str - required: false - name: - description: name - type: str - required: true - description: - description: description - type: str - required: true - function_id: - description: function_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - scw_sqs_config: - description: scw_sqs_config - type: dict - required: false - sqs_config: - description: sqs_config - type: dict - required: false - scw_nats_config: - description: scw_nats_config - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a trigger - scaleway.scaleway.scaleway_function_trigger: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - name: "aaaaaa" - description: "aaaaaa" - function_id: "aaaaaa" -""" - -RETURN = r""" ---- -trigger: - description: The trigger information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - input_type: sqs - status: ready - error_message: "aaaaaa" - function_id: 00000000-0000-0000-0000-000000000000 - scw_sqs_config: - aaaaaa: bbbbbb - cccccc: dddddd - sqs_config: - aaaaaa: bbbbbb - cccccc: dddddd - scw_nats_config: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_function_trigger.yml b/plugins/modules/scaleway_function_trigger.yml new file mode 100644 index 0000000..4539893 --- /dev/null +++ b/plugins/modules/scaleway_function_trigger.yml @@ -0,0 +1,90 @@ +DOCUMENTATION: + module: scaleway_function_trigger + short_description: Manage Scaleway function's trigger + description: + - This module can be used to manage Scaleway function's trigger. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + trigger_id: + description: trigger_id + type: str + required: false + name: + description: name + type: str + required: true + description: + description: description + type: str + required: true + function_id: + description: function_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + scw_sqs_config: + description: scw_sqs_config + type: dict + required: false + sqs_config: + description: sqs_config + type: dict + required: false + scw_nats_config: + description: scw_nats_config + type: dict + required: false + +EXAMPLES: + - name: Create a trigger + scaleway.scaleway.scaleway_function_trigger: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + name: "aaaaaa" + description: "aaaaaa" + function_id: "aaaaaa" + +RETURN: + trigger: + description: The trigger information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + input_type: sqs + status: ready + error_message: "aaaaaa" + function_id: 00000000-0000-0000-0000-000000000000 + scw_sqs_config: + aaaaaa: bbbbbb + cccccc: dddddd + sqs_config: + aaaaaa: bbbbbb + cccccc: dddddd + scw_nats_config: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_iam_api_key.py b/plugins/modules/scaleway_iam_api_key.py index 9f9999b..876b7fc 100644 --- a/plugins/modules/scaleway_iam_api_key.py +++ b/plugins/modules/scaleway_iam_api_key.py @@ -7,82 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iam_api_key -short_description: Manage Scaleway iam's api_key -description: - - This module can be used to manage Scaleway iam's api_key. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - access_key: - description: access_key - type: str - required: false - description: - description: description - type: str - required: true - application_id: - description: application_id - type: str - required: false - user_id: - description: user_id - type: str - required: false - expires_at: - description: expires_at - type: str - required: false - default_project_id: - description: default_project_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a api_key - scaleway.scaleway.scaleway_iam_api_key: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" -""" - -RETURN = r""" ---- -api_key: - description: The api_key information - returned: when I(state=present) - type: dict - sample: - access_key: "aaaaaa" - secret_key: "aaaaaa" - application_id: 00000000-0000-0000-0000-000000000000 - user_id: 00000000-0000-0000-0000-000000000000 - description: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - expires_at: "aaaaaa" - default_project_id: 00000000-0000-0000-0000-000000000000 - editable: true - creation_ip: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iam_api_key.yml b/plugins/modules/scaleway_iam_api_key.yml new file mode 100644 index 0000000..d4ffa2c --- /dev/null +++ b/plugins/modules/scaleway_iam_api_key.yml @@ -0,0 +1,71 @@ +DOCUMENTATION: + module: scaleway_iam_api_key + short_description: Manage Scaleway iam's api_key + description: + - This module can be used to manage Scaleway iam's api_key. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + access_key: + description: access_key + type: str + required: false + description: + description: description + type: str + required: true + application_id: + description: application_id + type: str + required: false + user_id: + description: user_id + type: str + required: false + expires_at: + description: expires_at + type: str + required: false + default_project_id: + description: default_project_id + type: str + required: false + +EXAMPLES: + - name: Create a api_key + scaleway.scaleway.scaleway_iam_api_key: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + +RETURN: + api_key: + description: The api_key information + returned: when I(state=present) + type: dict + sample: + access_key: "aaaaaa" + secret_key: "aaaaaa" + application_id: 00000000-0000-0000-0000-000000000000 + user_id: 00000000-0000-0000-0000-000000000000 + description: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + expires_at: "aaaaaa" + default_project_id: 00000000-0000-0000-0000-000000000000 + editable: true + creation_ip: "aaaaaa" diff --git a/plugins/modules/scaleway_iam_application.py b/plugins/modules/scaleway_iam_application.py index 3faa541..a271659 100644 --- a/plugins/modules/scaleway_iam_application.py +++ b/plugins/modules/scaleway_iam_application.py @@ -7,71 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iam_application -short_description: Manage Scaleway iam's application -description: - - This module can be used to manage Scaleway iam's application. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - application_id: - description: application_id - type: str - required: false - description: - description: description - type: str - required: true - name: - description: name - type: str - required: false - organization_id: - description: organization_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a application - scaleway.scaleway.scaleway_iam_application: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" -""" - -RETURN = r""" ---- -application: - description: The application information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - editable: true - nb_api_keys: 3 -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iam_application.yml b/plugins/modules/scaleway_iam_application.yml new file mode 100644 index 0000000..02da3ee --- /dev/null +++ b/plugins/modules/scaleway_iam_application.yml @@ -0,0 +1,60 @@ +DOCUMENTATION: + module: scaleway_iam_application + short_description: Manage Scaleway iam's application + description: + - This module can be used to manage Scaleway iam's application. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + application_id: + description: application_id + type: str + required: false + description: + description: description + type: str + required: true + name: + description: name + type: str + required: false + organization_id: + description: organization_id + type: str + required: false + +EXAMPLES: + - name: Create a application + scaleway.scaleway.scaleway_iam_application: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + +RETURN: + application: + description: The application information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + editable: true + nb_api_keys: 3 diff --git a/plugins/modules/scaleway_iam_group.py b/plugins/modules/scaleway_iam_group.py index a286b7f..5995f11 100644 --- a/plugins/modules/scaleway_iam_group.py +++ b/plugins/modules/scaleway_iam_group.py @@ -7,71 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iam_group -short_description: Manage Scaleway iam's group -description: - - This module can be used to manage Scaleway iam's group. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - group_id: - description: group_id - type: str - required: false - description: - description: description - type: str - required: true - organization_id: - description: organization_id - type: str - required: false - name: - description: name - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a group - scaleway.scaleway.scaleway_iam_group: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" -""" - -RETURN = r""" ---- -group: - description: The group information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - user_ids: 00000000-0000-0000-0000-000000000000 - application_ids: 00000000-0000-0000-0000-000000000000 -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iam_group.yml b/plugins/modules/scaleway_iam_group.yml new file mode 100644 index 0000000..ee83a15 --- /dev/null +++ b/plugins/modules/scaleway_iam_group.yml @@ -0,0 +1,60 @@ +DOCUMENTATION: + module: scaleway_iam_group + short_description: Manage Scaleway iam's group + description: + - This module can be used to manage Scaleway iam's group. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + group_id: + description: group_id + type: str + required: false + description: + description: description + type: str + required: true + organization_id: + description: organization_id + type: str + required: false + name: + description: name + type: str + required: false + +EXAMPLES: + - name: Create a group + scaleway.scaleway.scaleway_iam_group: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + +RETURN: + group: + description: The group information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + user_ids: 00000000-0000-0000-0000-000000000000 + application_ids: 00000000-0000-0000-0000-000000000000 diff --git a/plugins/modules/scaleway_iam_policy.py b/plugins/modules/scaleway_iam_policy.py index d9609f6..202175e 100644 --- a/plugins/modules/scaleway_iam_policy.py +++ b/plugins/modules/scaleway_iam_policy.py @@ -7,98 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iam_policy -short_description: Manage Scaleway iam's policy -description: - - This module can be used to manage Scaleway iam's policy. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - policy_id: - description: policy_id - type: str - required: false - description: - description: description - type: str - required: true - name: - description: name - type: str - required: false - organization_id: - description: organization_id - type: str - required: false - rules: - description: rules - type: list - elements: str - required: false - user_id: - description: user_id - type: str - required: false - group_id: - description: group_id - type: str - required: false - application_id: - description: application_id - type: str - required: false - no_principal: - description: no_principal - type: bool - required: false -""" - -EXAMPLES = r""" -- name: Create a policy - scaleway.scaleway.scaleway_iam_policy: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" -""" - -RETURN = r""" ---- -policy: - description: The policy information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - editable: true - nb_rules: 3 - nb_scopes: 3 - nb_permission_sets: 3 - user_id: 00000000-0000-0000-0000-000000000000 - group_id: 00000000-0000-0000-0000-000000000000 - application_id: 00000000-0000-0000-0000-000000000000 - no_principal: true -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iam_policy.yml b/plugins/modules/scaleway_iam_policy.yml new file mode 100644 index 0000000..a29d179 --- /dev/null +++ b/plugins/modules/scaleway_iam_policy.yml @@ -0,0 +1,87 @@ +DOCUMENTATION: + module: scaleway_iam_policy + short_description: Manage Scaleway iam's policy + description: + - This module can be used to manage Scaleway iam's policy. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + policy_id: + description: policy_id + type: str + required: false + description: + description: description + type: str + required: true + name: + description: name + type: str + required: false + organization_id: + description: organization_id + type: str + required: false + rules: + description: rules + type: list + elements: str + required: false + user_id: + description: user_id + type: str + required: false + group_id: + description: group_id + type: str + required: false + application_id: + description: application_id + type: str + required: false + no_principal: + description: no_principal + type: bool + required: false + +EXAMPLES: + - name: Create a policy + scaleway.scaleway.scaleway_iam_policy: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + +RETURN: + policy: + description: The policy information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + editable: true + nb_rules: 3 + nb_scopes: 3 + nb_permission_sets: 3 + user_id: 00000000-0000-0000-0000-000000000000 + group_id: 00000000-0000-0000-0000-000000000000 + application_id: 00000000-0000-0000-0000-000000000000 + no_principal: true diff --git a/plugins/modules/scaleway_iam_ssh_key.py b/plugins/modules/scaleway_iam_ssh_key.py index e3d6e54..6f80d02 100644 --- a/plugins/modules/scaleway_iam_ssh_key.py +++ b/plugins/modules/scaleway_iam_ssh_key.py @@ -7,72 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iam_ssh_key -short_description: Manage Scaleway iam's ssh_key -description: - - This module can be used to manage Scaleway iam's ssh_key. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - ssh_key_id: - description: ssh_key_id - type: str - required: false - public_key: - description: public_key - type: str - required: true - name: - description: name - type: str - required: false - project_id: - description: project_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a ssh_key - scaleway.scaleway.scaleway_iam_ssh_key: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - public_key: "aaaaaa" -""" - -RETURN = r""" ---- -ssh_key: - description: The ssh_key information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - public_key: "aaaaaa" - fingerprint: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - disabled: true -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iam_ssh_key.yml b/plugins/modules/scaleway_iam_ssh_key.yml new file mode 100644 index 0000000..be693ad --- /dev/null +++ b/plugins/modules/scaleway_iam_ssh_key.yml @@ -0,0 +1,61 @@ +DOCUMENTATION: + module: scaleway_iam_ssh_key + short_description: Manage Scaleway iam's ssh_key + description: + - This module can be used to manage Scaleway iam's ssh_key. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + ssh_key_id: + description: ssh_key_id + type: str + required: false + public_key: + description: public_key + type: str + required: true + name: + description: name + type: str + required: false + project_id: + description: project_id + type: str + required: false + +EXAMPLES: + - name: Create a ssh_key + scaleway.scaleway.scaleway_iam_ssh_key: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + public_key: "aaaaaa" + +RETURN: + ssh_key: + description: The ssh_key information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + public_key: "aaaaaa" + fingerprint: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + disabled: true diff --git a/plugins/modules/scaleway_instance_image.py b/plugins/modules/scaleway_instance_image.py index 6827623..ea97584 100644 --- a/plugins/modules/scaleway_instance_image.py +++ b/plugins/modules/scaleway_instance_image.py @@ -7,99 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_image -short_description: Manage Scaleway instance's image -description: - - This module can be used to manage Scaleway instance's image. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - image_id: - description: image_id - type: str - required: false - root_volume: - description: root_volume - type: str - required: true - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - arch: - description: arch - type: str - required: true - choices: - - x86_64 - - arm - default_bootscript: - description: default_bootscript - type: str - required: false - extra_volumes: - description: extra_volumes - type: dict - required: false - organization: - description: organization - type: str - required: false - project: - description: project - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - public: - description: public - type: bool - required: false -""" - -EXAMPLES = r""" -- name: Create a image - scaleway.scaleway.scaleway_instance_image: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - root_volume: "aaaaaa" - arch: "aaaaaa" -""" - -RETURN = r""" ---- -image: - description: The image information - returned: when I(state=present) - type: dict - sample: - image: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_image.yml b/plugins/modules/scaleway_instance_image.yml new file mode 100644 index 0000000..46bd407 --- /dev/null +++ b/plugins/modules/scaleway_instance_image.yml @@ -0,0 +1,88 @@ +DOCUMENTATION: + module: scaleway_instance_image + short_description: Manage Scaleway instance's image + description: + - This module can be used to manage Scaleway instance's image. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + image_id: + description: image_id + type: str + required: false + root_volume: + description: root_volume + type: str + required: true + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + arch: + description: arch + type: str + required: true + choices: + - x86_64 + - arm + default_bootscript: + description: default_bootscript + type: str + required: false + extra_volumes: + description: extra_volumes + type: dict + required: false + organization: + description: organization + type: str + required: false + project: + description: project + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + public: + description: public + type: bool + required: false + +EXAMPLES: + - name: Create a image + scaleway.scaleway.scaleway_instance_image: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + root_volume: "aaaaaa" + arch: "aaaaaa" + +RETURN: + image: + description: The image information + returned: when I(state=present) + type: dict + sample: + image: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_ip.py b/plugins/modules/scaleway_instance_ip.py index d7575f1..a7b42d4 100644 --- a/plugins/modules/scaleway_instance_ip.py +++ b/plugins/modules/scaleway_instance_ip.py @@ -7,74 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_ip -short_description: Manage Scaleway instance's ip -description: - - This module can be used to manage Scaleway instance's ip. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - ip: - description: ip - type: str - required: false - zone: - description: zone - type: str - required: false - organization: - description: organization - type: str - required: false - project: - description: project - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - server: - description: server - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a ip - scaleway.scaleway.scaleway_instance_ip: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -ip: - description: The ip information - returned: when I(state=present) - type: dict - sample: - ip: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_ip.yml b/plugins/modules/scaleway_instance_ip.yml new file mode 100644 index 0000000..b8ec47b --- /dev/null +++ b/plugins/modules/scaleway_instance_ip.yml @@ -0,0 +1,63 @@ +DOCUMENTATION: + module: scaleway_instance_ip + short_description: Manage Scaleway instance's ip + description: + - This module can be used to manage Scaleway instance's ip. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + ip: + description: ip + type: str + required: false + zone: + description: zone + type: str + required: false + organization: + description: organization + type: str + required: false + project: + description: project + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + server: + description: server + type: str + required: false + +EXAMPLES: + - name: Create a ip + scaleway.scaleway.scaleway_instance_ip: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + +RETURN: + ip: + description: The ip information + returned: when I(state=present) + type: dict + sample: + ip: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_placement_group.py b/plugins/modules/scaleway_instance_placement_group.py index d4fd405..53f4758 100644 --- a/plugins/modules/scaleway_instance_placement_group.py +++ b/plugins/modules/scaleway_instance_placement_group.py @@ -7,90 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_placement_group -short_description: Manage Scaleway instance's placement_group -description: - - This module can be used to manage Scaleway instance's placement_group. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - placement_group_id: - description: placement_group_id - type: str - required: false - policy_mode: - description: policy_mode - type: str - required: true - choices: - - optional - - enforced - policy_type: - description: policy_type - type: str - required: true - choices: - - max_availability - - low_latency - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - organization: - description: organization - type: str - required: false - project: - description: project - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a placement_group - scaleway.scaleway.scaleway_instance_placement_group: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - policy_mode: "aaaaaa" - policy_type: "aaaaaa" -""" - -RETURN = r""" ---- -placement_group: - description: The placement_group information - returned: when I(state=present) - type: dict - sample: - placement_group: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_placement_group.yml b/plugins/modules/scaleway_instance_placement_group.yml new file mode 100644 index 0000000..6c1a6d6 --- /dev/null +++ b/plugins/modules/scaleway_instance_placement_group.yml @@ -0,0 +1,79 @@ +DOCUMENTATION: + module: scaleway_instance_placement_group + short_description: Manage Scaleway instance's placement_group + description: + - This module can be used to manage Scaleway instance's placement_group. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + placement_group_id: + description: placement_group_id + type: str + required: false + policy_mode: + description: policy_mode + type: str + required: true + choices: + - optional + - enforced + policy_type: + description: policy_type + type: str + required: true + choices: + - max_availability + - low_latency + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + organization: + description: organization + type: str + required: false + project: + description: project + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a placement_group + scaleway.scaleway.scaleway_instance_placement_group: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + policy_mode: "aaaaaa" + policy_type: "aaaaaa" + +RETURN: + placement_group: + description: The placement_group information + returned: when I(state=present) + type: dict + sample: + placement_group: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_private_nic.py b/plugins/modules/scaleway_instance_private_nic.py index 1cef917..d688694 100644 --- a/plugins/modules/scaleway_instance_private_nic.py +++ b/plugins/modules/scaleway_instance_private_nic.py @@ -7,68 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_private_nic -short_description: Manage Scaleway instance's private_nic -description: - - This module can be used to manage Scaleway instance's private_nic. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - server_id: - description: server_id - type: str - required: true - private_network_id: - description: private_network_id - type: str - required: true - zone: - description: zone - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a private_nic - scaleway.scaleway.scaleway_instance_private_nic: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - server_id: "aaaaaa" - private_network_id: "aaaaaa" -""" - -RETURN = r""" ---- -private_nic: - description: The private_nic information - returned: when I(state=present) - type: dict - sample: - private_nic: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_private_nic.yml b/plugins/modules/scaleway_instance_private_nic.yml new file mode 100644 index 0000000..fa0f6eb --- /dev/null +++ b/plugins/modules/scaleway_instance_private_nic.yml @@ -0,0 +1,57 @@ +DOCUMENTATION: + module: scaleway_instance_private_nic + short_description: Manage Scaleway instance's private_nic + description: + - This module can be used to manage Scaleway instance's private_nic. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + server_id: + description: server_id + type: str + required: true + private_network_id: + description: private_network_id + type: str + required: true + zone: + description: zone + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a private_nic + scaleway.scaleway.scaleway_instance_private_nic: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + server_id: "aaaaaa" + private_network_id: "aaaaaa" + +RETURN: + private_nic: + description: The private_nic information + returned: when I(state=present) + type: dict + sample: + private_nic: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_security_group.py b/plugins/modules/scaleway_instance_security_group.py index aff0233..5743aeb 100644 --- a/plugins/modules/scaleway_instance_security_group.py +++ b/plugins/modules/scaleway_instance_security_group.py @@ -7,112 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_security_group -short_description: Manage Scaleway instance's security_group -description: - - This module can be used to manage Scaleway instance's security_group. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - security_group_id: - description: security_group_id - type: str - required: false - description: - description: description - type: str - required: true - stateful: - description: stateful - type: bool - required: true - inbound_default_policy: - description: inbound_default_policy - type: str - required: true - choices: - - accept - - drop - outbound_default_policy: - description: outbound_default_policy - type: str - required: true - choices: - - accept - - drop - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - organization: - description: organization - type: str - required: false - project: - description: project - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - organization_default: - description: organization_default - type: bool - required: false - project_default: - description: project_default - type: bool - required: false - enable_default_security: - description: enable_default_security - type: bool - required: false -""" - -EXAMPLES = r""" -- name: Create a security_group - scaleway.scaleway.scaleway_instance_security_group: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" - stateful: true - inbound_default_policy: "aaaaaa" - outbound_default_policy: "aaaaaa" -""" - -RETURN = r""" ---- -security_group: - description: The security_group information - returned: when I(state=present) - type: dict - sample: - security_group: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_security_group.yml b/plugins/modules/scaleway_instance_security_group.yml new file mode 100644 index 0000000..fe15c01 --- /dev/null +++ b/plugins/modules/scaleway_instance_security_group.yml @@ -0,0 +1,101 @@ +DOCUMENTATION: + module: scaleway_instance_security_group + short_description: Manage Scaleway instance's security_group + description: + - This module can be used to manage Scaleway instance's security_group. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + security_group_id: + description: security_group_id + type: str + required: false + description: + description: description + type: str + required: true + stateful: + description: stateful + type: bool + required: true + inbound_default_policy: + description: inbound_default_policy + type: str + required: true + choices: + - accept + - drop + outbound_default_policy: + description: outbound_default_policy + type: str + required: true + choices: + - accept + - drop + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + organization: + description: organization + type: str + required: false + project: + description: project + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + organization_default: + description: organization_default + type: bool + required: false + project_default: + description: project_default + type: bool + required: false + enable_default_security: + description: enable_default_security + type: bool + required: false + +EXAMPLES: + - name: Create a security_group + scaleway.scaleway.scaleway_instance_security_group: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + stateful: true + inbound_default_policy: "aaaaaa" + outbound_default_policy: "aaaaaa" + +RETURN: + security_group: + description: The security_group information + returned: when I(state=present) + type: dict + sample: + security_group: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_security_group_rule.py b/plugins/modules/scaleway_instance_security_group_rule.py index 5caa238..81323fa 100644 --- a/plugins/modules/scaleway_instance_security_group_rule.py +++ b/plugins/modules/scaleway_instance_security_group_rule.py @@ -7,107 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_security_group_rule -short_description: Manage Scaleway instance's security_group_rule -description: - - This module can be used to manage Scaleway instance's security_group_rule. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - security_group_id: - description: security_group_id - type: str - required: true - ip_range: - description: ip_range - type: str - required: true - position: - description: position - type: int - required: true - editable: - description: editable - type: bool - required: true - zone: - description: zone - type: str - required: false - protocol: - description: protocol - type: str - required: true - choices: - - TCP - - UDP - - ICMP - - ANY - direction: - description: direction - type: str - required: true - choices: - - inbound - - outbound - action: - description: action - type: str - required: true - choices: - - accept - - drop - dest_port_from: - description: dest_port_from - type: int - required: false - dest_port_to: - description: dest_port_to - type: int - required: false -""" - -EXAMPLES = r""" -- name: Create a security_group_rule - scaleway.scaleway.scaleway_instance_security_group_rule: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - security_group_id: "aaaaaa" - ip_range: "aaaaaa" - position: "aaaaaa" - editable: true - protocol: "aaaaaa" - direction: "aaaaaa" - action: "aaaaaa" -""" - -RETURN = r""" ---- -security_group_rule: - description: The security_group_rule information - returned: when I(state=present) - type: dict - sample: - rule: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_security_group_rule.yml b/plugins/modules/scaleway_instance_security_group_rule.yml new file mode 100644 index 0000000..7b37941 --- /dev/null +++ b/plugins/modules/scaleway_instance_security_group_rule.yml @@ -0,0 +1,96 @@ +DOCUMENTATION: + module: scaleway_instance_security_group_rule + short_description: Manage Scaleway instance's security_group_rule + description: + - This module can be used to manage Scaleway instance's security_group_rule. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + security_group_id: + description: security_group_id + type: str + required: true + ip_range: + description: ip_range + type: str + required: true + position: + description: position + type: int + required: true + editable: + description: editable + type: bool + required: true + zone: + description: zone + type: str + required: false + protocol: + description: protocol + type: str + required: true + choices: + - TCP + - UDP + - ICMP + - ANY + direction: + description: direction + type: str + required: true + choices: + - inbound + - outbound + action: + description: action + type: str + required: true + choices: + - accept + - drop + dest_port_from: + description: dest_port_from + type: int + required: false + dest_port_to: + description: dest_port_to + type: int + required: false + +EXAMPLES: + - name: Create a security_group_rule + scaleway.scaleway.scaleway_instance_security_group_rule: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + security_group_id: "aaaaaa" + ip_range: "aaaaaa" + position: "aaaaaa" + editable: true + protocol: "aaaaaa" + direction: "aaaaaa" + action: "aaaaaa" + +RETURN: + security_group_rule: + description: The security_group_rule information + returned: when I(state=present) + type: dict + sample: + rule: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_snapshot.py b/plugins/modules/scaleway_instance_snapshot.py index 9645245..fd8646f 100644 --- a/plugins/modules/scaleway_instance_snapshot.py +++ b/plugins/modules/scaleway_instance_snapshot.py @@ -7,100 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_snapshot -short_description: Manage Scaleway instance's snapshot -description: - - This module can be used to manage Scaleway instance's snapshot. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - snapshot_id: - description: snapshot_id - type: str - required: false - volume_type: - description: volume_type - type: str - required: true - choices: - - unknown_volume_type - - l_ssd - - b_ssd - - unified - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - volume_id: - description: volume_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - organization: - description: organization - type: str - required: false - project: - description: project - type: str - required: false - bucket: - description: bucket - type: str - required: false - key: - description: key - type: str - required: false - size: - description: size - type: int - required: false -""" - -EXAMPLES = r""" -- name: Create a snapshot - scaleway.scaleway.scaleway_instance_snapshot: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - volume_type: "aaaaaa" -""" - -RETURN = r""" ---- -snapshot: - description: The snapshot information - returned: when I(state=present) - type: dict - sample: - snapshot: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_snapshot.yml b/plugins/modules/scaleway_instance_snapshot.yml new file mode 100644 index 0000000..97641de --- /dev/null +++ b/plugins/modules/scaleway_instance_snapshot.yml @@ -0,0 +1,89 @@ +DOCUMENTATION: + module: scaleway_instance_snapshot + short_description: Manage Scaleway instance's snapshot + description: + - This module can be used to manage Scaleway instance's snapshot. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + snapshot_id: + description: snapshot_id + type: str + required: false + volume_type: + description: volume_type + type: str + required: true + choices: + - unknown_volume_type + - l_ssd + - b_ssd + - unified + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + volume_id: + description: volume_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + organization: + description: organization + type: str + required: false + project: + description: project + type: str + required: false + bucket: + description: bucket + type: str + required: false + key: + description: key + type: str + required: false + size: + description: size + type: int + required: false + +EXAMPLES: + - name: Create a snapshot + scaleway.scaleway.scaleway_instance_snapshot: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + volume_type: "aaaaaa" + +RETURN: + snapshot: + description: The snapshot information + returned: when I(state=present) + type: dict + sample: + snapshot: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_instance_volume.py b/plugins/modules/scaleway_instance_volume.py index ee1bc5b..c462065 100644 --- a/plugins/modules/scaleway_instance_volume.py +++ b/plugins/modules/scaleway_instance_volume.py @@ -7,95 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_instance_volume -short_description: Manage Scaleway instance's volume -description: - - This module can be used to manage Scaleway instance's volume. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - volume_id: - description: volume_id - type: str - required: false - volume_type: - description: volume_type - type: str - required: true - choices: - - l_ssd - - b_ssd - - unified - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - organization: - description: organization - type: str - required: false - project: - description: project - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - size: - description: size - type: int - required: false - base_volume: - description: base_volume - type: str - required: false - base_snapshot: - description: base_snapshot - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a volume - scaleway.scaleway.scaleway_instance_volume: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - volume_type: "aaaaaa" -""" - -RETURN = r""" ---- -volume: - description: The volume information - returned: when I(state=present) - type: dict - sample: - volume: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_instance_volume.yml b/plugins/modules/scaleway_instance_volume.yml new file mode 100644 index 0000000..425c903 --- /dev/null +++ b/plugins/modules/scaleway_instance_volume.yml @@ -0,0 +1,84 @@ +DOCUMENTATION: + module: scaleway_instance_volume + short_description: Manage Scaleway instance's volume + description: + - This module can be used to manage Scaleway instance's volume. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + volume_id: + description: volume_id + type: str + required: false + volume_type: + description: volume_type + type: str + required: true + choices: + - l_ssd + - b_ssd + - unified + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + organization: + description: organization + type: str + required: false + project: + description: project + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + size: + description: size + type: int + required: false + base_volume: + description: base_volume + type: str + required: false + base_snapshot: + description: base_snapshot + type: str + required: false + +EXAMPLES: + - name: Create a volume + scaleway.scaleway.scaleway_instance_volume: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + volume_type: "aaaaaa" + +RETURN: + volume: + description: The volume information + returned: when I(state=present) + type: dict + sample: + volume: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_iot_device.py b/plugins/modules/scaleway_iot_device.py index b129f6f..7007f38 100644 --- a/plugins/modules/scaleway_iot_device.py +++ b/plugins/modules/scaleway_iot_device.py @@ -7,100 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iot_device -short_description: Manage Scaleway iot's device -description: - - This module can be used to manage Scaleway iot's device. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - device_id: - description: device_id - type: str - required: false - hub_id: - description: hub_id - type: str - required: true - allow_insecure: - description: allow_insecure - type: bool - required: true - allow_multiple_connections: - description: allow_multiple_connections - type: bool - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - message_filters: - description: message_filters - type: dict - required: false - description: - description: description - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a device - scaleway.scaleway.scaleway_iot_device: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - hub_id: "aaaaaa" - allow_insecure: true - allow_multiple_connections: true -""" - -RETURN = r""" ---- -device: - description: The device information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - status: error - hub_id: 00000000-0000-0000-0000-000000000000 - last_activity_at: "aaaaaa" - is_connected: true - allow_insecure: true - allow_multiple_connections: true - message_filters: - aaaaaa: bbbbbb - cccccc: dddddd - has_custom_certificate: true - created_at: "aaaaaa" - updated_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iot_device.yml b/plugins/modules/scaleway_iot_device.yml new file mode 100644 index 0000000..a3afdc5 --- /dev/null +++ b/plugins/modules/scaleway_iot_device.yml @@ -0,0 +1,89 @@ +DOCUMENTATION: + module: scaleway_iot_device + short_description: Manage Scaleway iot's device + description: + - This module can be used to manage Scaleway iot's device. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + device_id: + description: device_id + type: str + required: false + hub_id: + description: hub_id + type: str + required: true + allow_insecure: + description: allow_insecure + type: bool + required: true + allow_multiple_connections: + description: allow_multiple_connections + type: bool + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + message_filters: + description: message_filters + type: dict + required: false + description: + description: description + type: str + required: false + +EXAMPLES: + - name: Create a device + scaleway.scaleway.scaleway_iot_device: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + hub_id: "aaaaaa" + allow_insecure: true + allow_multiple_connections: true + +RETURN: + device: + description: The device information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + status: error + hub_id: 00000000-0000-0000-0000-000000000000 + last_activity_at: "aaaaaa" + is_connected: true + allow_insecure: true + allow_multiple_connections: true + message_filters: + aaaaaa: bbbbbb + cccccc: dddddd + has_custom_certificate: true + created_at: "aaaaaa" + updated_at: "aaaaaa" diff --git a/plugins/modules/scaleway_iot_hub.py b/plugins/modules/scaleway_iot_hub.py index 7795aa7..0be7e18 100644 --- a/plugins/modules/scaleway_iot_hub.py +++ b/plugins/modules/scaleway_iot_hub.py @@ -7,108 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iot_hub -short_description: Manage Scaleway iot's hub -description: - - This module can be used to manage Scaleway iot's hub. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - hub_id: - description: hub_id - type: str - required: false - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - project_id: - description: project_id - type: str - required: false - product_plan: - description: product_plan - type: str - required: true - choices: - - plan_unknown - - plan_shared - - plan_dedicated - - plan_ha - disable_events: - description: disable_events - type: bool - required: false - events_topic_prefix: - description: events_topic_prefix - type: str - required: false - twins_graphite_config: - description: twins_graphite_config - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a hub - scaleway.scaleway.scaleway_iot_hub: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - product_plan: "aaaaaa" -""" - -RETURN = r""" ---- -hub: - description: The hub information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - status: error - product_plan: plan_shared - enabled: true - device_count: 3 - connected_device_count: 3 - endpoint: "aaaaaa" - disable_events: true - events_topic_prefix: "aaaaaa" - region: fr-par - created_at: "aaaaaa" - updated_at: "aaaaaa" - project_id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - enable_device_auto_provisioning: true - has_custom_ca: true - twins_graphite_config: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iot_hub.yml b/plugins/modules/scaleway_iot_hub.yml new file mode 100644 index 0000000..b7d3e39 --- /dev/null +++ b/plugins/modules/scaleway_iot_hub.yml @@ -0,0 +1,97 @@ +DOCUMENTATION: + module: scaleway_iot_hub + short_description: Manage Scaleway iot's hub + description: + - This module can be used to manage Scaleway iot's hub. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + hub_id: + description: hub_id + type: str + required: false + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + project_id: + description: project_id + type: str + required: false + product_plan: + description: product_plan + type: str + required: true + choices: + - plan_unknown + - plan_shared + - plan_dedicated + - plan_ha + disable_events: + description: disable_events + type: bool + required: false + events_topic_prefix: + description: events_topic_prefix + type: str + required: false + twins_graphite_config: + description: twins_graphite_config + type: dict + required: false + +EXAMPLES: + - name: Create a hub + scaleway.scaleway.scaleway_iot_hub: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + product_plan: "aaaaaa" + +RETURN: + hub: + description: The hub information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + status: error + product_plan: plan_shared + enabled: true + device_count: 3 + connected_device_count: 3 + endpoint: "aaaaaa" + disable_events: true + events_topic_prefix: "aaaaaa" + region: fr-par + created_at: "aaaaaa" + updated_at: "aaaaaa" + project_id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + enable_device_auto_provisioning: true + has_custom_ca: true + twins_graphite_config: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_iot_network.py b/plugins/modules/scaleway_iot_network.py index 5276fea..88ce278 100644 --- a/plugins/modules/scaleway_iot_network.py +++ b/plugins/modules/scaleway_iot_network.py @@ -7,88 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iot_network -short_description: Manage Scaleway iot's network -description: - - This module can be used to manage Scaleway iot's network. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - network_id: - description: network_id - type: str - required: false - hub_id: - description: hub_id - type: str - required: true - topic_prefix: - description: topic_prefix - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - type_: - description: type_ - type: str - required: true - choices: - - unknown - - sigfox - - rest -""" - -EXAMPLES = r""" -- name: Create a network - scaleway.scaleway.scaleway_iot_network: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - hub_id: "aaaaaa" - topic_prefix: "aaaaaa" - type_: "aaaaaa" -""" - -RETURN = r""" ---- -network: - description: The network information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - type_: sigfox - endpoint: "aaaaaa" - hub_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - topic_prefix: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iot_network.yml b/plugins/modules/scaleway_iot_network.yml new file mode 100644 index 0000000..212ade7 --- /dev/null +++ b/plugins/modules/scaleway_iot_network.yml @@ -0,0 +1,77 @@ +DOCUMENTATION: + module: scaleway_iot_network + short_description: Manage Scaleway iot's network + description: + - This module can be used to manage Scaleway iot's network. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + network_id: + description: network_id + type: str + required: false + hub_id: + description: hub_id + type: str + required: true + topic_prefix: + description: topic_prefix + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + type_: + description: type_ + type: str + required: true + choices: + - unknown + - sigfox + - rest + +EXAMPLES: + - name: Create a network + scaleway.scaleway.scaleway_iot_network: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + hub_id: "aaaaaa" + topic_prefix: "aaaaaa" + type_: "aaaaaa" + +RETURN: + network: + description: The network information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + type_: sigfox + endpoint: "aaaaaa" + hub_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + topic_prefix: "aaaaaa" diff --git a/plugins/modules/scaleway_iot_route.py b/plugins/modules/scaleway_iot_route.py index 8f4f17c..ad194b5 100644 --- a/plugins/modules/scaleway_iot_route.py +++ b/plugins/modules/scaleway_iot_route.py @@ -7,100 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_iot_route -short_description: Manage Scaleway iot's route -description: - - This module can be used to manage Scaleway iot's route. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - route_id: - description: route_id - type: str - required: false - hub_id: - description: hub_id - type: str - required: true - topic: - description: topic - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - s3_config: - description: s3_config - type: dict - required: false - db_config: - description: db_config - type: dict - required: false - rest_config: - description: rest_config - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a route - scaleway.scaleway.scaleway_iot_route: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - hub_id: "aaaaaa" - topic: "aaaaaa" -""" - -RETURN = r""" ---- -route: - description: The route information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - hub_id: 00000000-0000-0000-0000-000000000000 - topic: "aaaaaa" - type_: s3 - created_at: "aaaaaa" - s3_config: - aaaaaa: bbbbbb - cccccc: dddddd - db_config: - aaaaaa: bbbbbb - cccccc: dddddd - rest_config: - aaaaaa: bbbbbb - cccccc: dddddd - updated_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_iot_route.yml b/plugins/modules/scaleway_iot_route.yml new file mode 100644 index 0000000..5e7d612 --- /dev/null +++ b/plugins/modules/scaleway_iot_route.yml @@ -0,0 +1,89 @@ +DOCUMENTATION: + module: scaleway_iot_route + short_description: Manage Scaleway iot's route + description: + - This module can be used to manage Scaleway iot's route. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + route_id: + description: route_id + type: str + required: false + hub_id: + description: hub_id + type: str + required: true + topic: + description: topic + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + s3_config: + description: s3_config + type: dict + required: false + db_config: + description: db_config + type: dict + required: false + rest_config: + description: rest_config + type: dict + required: false + +EXAMPLES: + - name: Create a route + scaleway.scaleway.scaleway_iot_route: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + hub_id: "aaaaaa" + topic: "aaaaaa" + +RETURN: + route: + description: The route information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + hub_id: 00000000-0000-0000-0000-000000000000 + topic: "aaaaaa" + type_: s3 + created_at: "aaaaaa" + s3_config: + aaaaaa: bbbbbb + cccccc: dddddd + db_config: + aaaaaa: bbbbbb + cccccc: dddddd + rest_config: + aaaaaa: bbbbbb + cccccc: dddddd + updated_at: "aaaaaa" diff --git a/plugins/modules/scaleway_k8s_cluster.py b/plugins/modules/scaleway_k8s_cluster.py index a3226a8..2ab5df5 100644 --- a/plugins/modules/scaleway_k8s_cluster.py +++ b/plugins/modules/scaleway_k8s_cluster.py @@ -7,184 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_k8s_cluster -short_description: Manage Scaleway k8s's cluster -description: - - This module can be used to manage Scaleway k8s's cluster. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - cluster_id: - description: cluster_id - type: str - required: false - type_: - description: type_ - type: str - required: true - description: - description: description - type: str - required: true - version: - description: version - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - organization_id: - description: organization_id - type: str - required: false - project_id: - description: project_id - type: str - required: false - name: - description: name - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - cni: - description: cni - type: str - required: true - choices: - - unknown_cni - - cilium - - calico - - weave - - flannel - - kilo - enable_dashboard: - description: enable_dashboard - type: bool - required: false - ingress: - description: ingress - type: str - required: false - choices: - - unknown_ingress - - none - - nginx - - traefik - - traefik2 - pools: - description: pools - type: list - elements: str - required: false - autoscaler_config: - description: autoscaler_config - type: dict - required: false - auto_upgrade: - description: auto_upgrade - type: dict - required: false - feature_gates: - description: feature_gates - type: list - elements: str - required: false - admission_plugins: - description: admission_plugins - type: list - elements: str - required: false - open_id_connect_config: - description: open_id_connect_config - type: dict - required: false - apiserver_cert_sans: - description: apiserver_cert_sans - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a cluster - scaleway.scaleway.scaleway_k8s_cluster: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - type_: "aaaaaa" - description: "aaaaaa" - version: "aaaaaa" - cni: "aaaaaa" -""" - -RETURN = r""" ---- -cluster: - description: The cluster information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - type_: "aaaaaa" - name: "aaaaaa" - status: creating - version: "aaaaaa" - region: fr-par - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - tags: - - aaaaaa - - bbbbbb - cni: cilium - description: "aaaaaa" - cluster_url: "aaaaaa" - dns_wildcard: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - autoscaler_config: - aaaaaa: bbbbbb - cccccc: dddddd - dashboard_enabled: true - ingress: none - auto_upgrade: - aaaaaa: bbbbbb - cccccc: dddddd - upgrade_available: true - feature_gates: - - aaaaaa - - bbbbbb - admission_plugins: - - aaaaaa - - bbbbbb - open_id_connect_config: 00000000-0000-0000-0000-000000000000 - apiserver_cert_sans: - - aaaaaa - - bbbbbb -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_k8s_cluster.yml b/plugins/modules/scaleway_k8s_cluster.yml new file mode 100644 index 0000000..01dae5c --- /dev/null +++ b/plugins/modules/scaleway_k8s_cluster.yml @@ -0,0 +1,173 @@ +DOCUMENTATION: + module: scaleway_k8s_cluster + short_description: Manage Scaleway k8s's cluster + description: + - This module can be used to manage Scaleway k8s's cluster. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + cluster_id: + description: cluster_id + type: str + required: false + type_: + description: type_ + type: str + required: true + description: + description: description + type: str + required: true + version: + description: version + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + organization_id: + description: organization_id + type: str + required: false + project_id: + description: project_id + type: str + required: false + name: + description: name + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + cni: + description: cni + type: str + required: true + choices: + - unknown_cni + - cilium + - calico + - weave + - flannel + - kilo + enable_dashboard: + description: enable_dashboard + type: bool + required: false + ingress: + description: ingress + type: str + required: false + choices: + - unknown_ingress + - none + - nginx + - traefik + - traefik2 + pools: + description: pools + type: list + elements: str + required: false + autoscaler_config: + description: autoscaler_config + type: dict + required: false + auto_upgrade: + description: auto_upgrade + type: dict + required: false + feature_gates: + description: feature_gates + type: list + elements: str + required: false + admission_plugins: + description: admission_plugins + type: list + elements: str + required: false + open_id_connect_config: + description: open_id_connect_config + type: dict + required: false + apiserver_cert_sans: + description: apiserver_cert_sans + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a cluster + scaleway.scaleway.scaleway_k8s_cluster: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + type_: "aaaaaa" + description: "aaaaaa" + version: "aaaaaa" + cni: "aaaaaa" + +RETURN: + cluster: + description: The cluster information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + type_: "aaaaaa" + name: "aaaaaa" + status: creating + version: "aaaaaa" + region: fr-par + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + tags: + - aaaaaa + - bbbbbb + cni: cilium + description: "aaaaaa" + cluster_url: "aaaaaa" + dns_wildcard: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + autoscaler_config: + aaaaaa: bbbbbb + cccccc: dddddd + dashboard_enabled: true + ingress: none + auto_upgrade: + aaaaaa: bbbbbb + cccccc: dddddd + upgrade_available: true + feature_gates: + - aaaaaa + - bbbbbb + admission_plugins: + - aaaaaa + - bbbbbb + open_id_connect_config: 00000000-0000-0000-0000-000000000000 + apiserver_cert_sans: + - aaaaaa + - bbbbbb diff --git a/plugins/modules/scaleway_k8s_pool.py b/plugins/modules/scaleway_k8s_pool.py index d75acbc..597aede 100644 --- a/plugins/modules/scaleway_k8s_pool.py +++ b/plugins/modules/scaleway_k8s_pool.py @@ -7,167 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_k8s_pool -short_description: Manage Scaleway k8s's pool -description: - - This module can be used to manage Scaleway k8s's pool. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - pool_id: - description: pool_id - type: str - required: false - cluster_id: - description: cluster_id - type: str - required: true - node_type: - description: node_type - type: str - required: true - autoscaling: - description: autoscaling - type: bool - required: true - size: - description: size - type: int - required: true - container_runtime: - description: container_runtime - type: str - required: true - choices: - - unknown_runtime - - docker - - containerd - - crio - autohealing: - description: autohealing - type: bool - required: true - root_volume_type: - description: root_volume_type - type: str - required: true - choices: - - default_volume_type - - l_ssd - - b_ssd - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - placement_group_id: - description: placement_group_id - type: str - required: false - min_size: - description: min_size - type: int - required: false - max_size: - description: max_size - type: int - required: false - tags: - description: tags - type: list - elements: str - required: false - kubelet_args: - description: kubelet_args - type: dict - required: false - upgrade_policy: - description: upgrade_policy - type: dict - required: false - zone: - description: zone - type: str - required: false - root_volume_size: - description: root_volume_size - type: int - required: false -""" - -EXAMPLES = r""" -- name: Create a pool - scaleway.scaleway.scaleway_k8s_pool: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - cluster_id: "aaaaaa" - node_type: "aaaaaa" - autoscaling: true - size: "aaaaaa" - container_runtime: "aaaaaa" - autohealing: true - root_volume_type: "aaaaaa" -""" - -RETURN = r""" ---- -pool: - description: The pool information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - cluster_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - name: "aaaaaa" - status: ready - version: "aaaaaa" - node_type: "aaaaaa" - autoscaling: true - size: 3 - min_size: 3 - max_size: 3 - container_runtime: docker - autohealing: true - tags: - - aaaaaa - - bbbbbb - placement_group_id: 00000000-0000-0000-0000-000000000000 - kubelet_args: - aaaaaa: bbbbbb - cccccc: dddddd - upgrade_policy: - aaaaaa: bbbbbb - cccccc: dddddd - zone: "aaaaaa" - root_volume_type: default_volume_type - root_volume_size: 3 - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_k8s_pool.yml b/plugins/modules/scaleway_k8s_pool.yml new file mode 100644 index 0000000..52dfc02 --- /dev/null +++ b/plugins/modules/scaleway_k8s_pool.yml @@ -0,0 +1,156 @@ +DOCUMENTATION: + module: scaleway_k8s_pool + short_description: Manage Scaleway k8s's pool + description: + - This module can be used to manage Scaleway k8s's pool. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + pool_id: + description: pool_id + type: str + required: false + cluster_id: + description: cluster_id + type: str + required: true + node_type: + description: node_type + type: str + required: true + autoscaling: + description: autoscaling + type: bool + required: true + size: + description: size + type: int + required: true + container_runtime: + description: container_runtime + type: str + required: true + choices: + - unknown_runtime + - docker + - containerd + - crio + autohealing: + description: autohealing + type: bool + required: true + root_volume_type: + description: root_volume_type + type: str + required: true + choices: + - default_volume_type + - l_ssd + - b_ssd + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + placement_group_id: + description: placement_group_id + type: str + required: false + min_size: + description: min_size + type: int + required: false + max_size: + description: max_size + type: int + required: false + tags: + description: tags + type: list + elements: str + required: false + kubelet_args: + description: kubelet_args + type: dict + required: false + upgrade_policy: + description: upgrade_policy + type: dict + required: false + zone: + description: zone + type: str + required: false + root_volume_size: + description: root_volume_size + type: int + required: false + +EXAMPLES: + - name: Create a pool + scaleway.scaleway.scaleway_k8s_pool: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + cluster_id: "aaaaaa" + node_type: "aaaaaa" + autoscaling: true + size: "aaaaaa" + container_runtime: "aaaaaa" + autohealing: true + root_volume_type: "aaaaaa" + +RETURN: + pool: + description: The pool information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + cluster_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + name: "aaaaaa" + status: ready + version: "aaaaaa" + node_type: "aaaaaa" + autoscaling: true + size: 3 + min_size: 3 + max_size: 3 + container_runtime: docker + autohealing: true + tags: + - aaaaaa + - bbbbbb + placement_group_id: 00000000-0000-0000-0000-000000000000 + kubelet_args: + aaaaaa: bbbbbb + cccccc: dddddd + upgrade_policy: + aaaaaa: bbbbbb + cccccc: dddddd + zone: "aaaaaa" + root_volume_type: default_volume_type + root_volume_size: 3 + region: fr-par diff --git a/plugins/modules/scaleway_lb.py b/plugins/modules/scaleway_lb.py index a61c0fc..95de7a2 100644 --- a/plugins/modules/scaleway_lb.py +++ b/plugins/modules/scaleway_lb.py @@ -7,127 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb -short_description: Manage Scaleway lb's lb -description: - - This module can be used to manage Scaleway lb's lb. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - lb_id: - description: lb_id - type: str - required: false - description: - description: description - type: str - required: true - type_: - description: type_ - type: str - required: true - ssl_compatibility_level: - description: ssl_compatibility_level - type: str - required: true - choices: - - ssl_compatibility_level_unknown - - ssl_compatibility_level_intermediate - - ssl_compatibility_level_modern - - ssl_compatibility_level_old - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - organization_id: - description: organization_id - type: str - required: false - project_id: - description: project_id - type: str - required: false - name: - description: name - type: str - required: false - ip_id: - description: ip_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a lb - scaleway.scaleway.scaleway_lb: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" - type_: "aaaaaa" - ssl_compatibility_level: "aaaaaa" -""" - -RETURN = r""" ---- -lb: - description: The lb information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - status: ready - instances: - - aaaaaa - - bbbbbb - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - ip: - - aaaaaa - - bbbbbb - tags: - - aaaaaa - - bbbbbb - frontend_count: 3 - backend_count: 3 - type_: "aaaaaa" - subscriber: - aaaaaa: bbbbbb - cccccc: dddddd - ssl_compatibility_level: ssl_compatibility_level_intermediate - created_at: "aaaaaa" - updated_at: "aaaaaa" - private_network_count: 3 - route_count: 3 - region: fr-par - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb.yml b/plugins/modules/scaleway_lb.yml new file mode 100644 index 0000000..accf6e0 --- /dev/null +++ b/plugins/modules/scaleway_lb.yml @@ -0,0 +1,117 @@ +DOCUMENTATION: + module: scaleway_lb + short_description: Manage Scaleway lb's lb + description: + - This module can be used to manage Scaleway lb's lb. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + lb_id: + description: lb_id + type: str + required: false + description: + description: description + type: str + required: true + type_: + description: type_ + type: str + required: true + ssl_compatibility_level: + description: ssl_compatibility_level + type: str + required: true + choices: + - ssl_compatibility_level_unknown + - ssl_compatibility_level_intermediate + - ssl_compatibility_level_modern + - ssl_compatibility_level_old + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + organization_id: + description: organization_id + type: str + required: false + project_id: + description: project_id + type: str + required: false + name: + description: name + type: str + required: false + ip_id: + description: ip_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + + +EXAMPLES: + - name: Create a lb + scaleway.scaleway.scaleway_lb: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + type_: "aaaaaa" + ssl_compatibility_level: "aaaaaa" + +RETURN: + lb: + description: The lb information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + status: ready + instances: + - aaaaaa + - bbbbbb + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + ip: + - aaaaaa + - bbbbbb + tags: + - aaaaaa + - bbbbbb + frontend_count: 3 + backend_count: 3 + type_: "aaaaaa" + subscriber: + aaaaaa: bbbbbb + cccccc: dddddd + ssl_compatibility_level: ssl_compatibility_level_intermediate + created_at: "aaaaaa" + updated_at: "aaaaaa" + private_network_count: 3 + route_count: 3 + region: fr-par + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_lb_acl.py b/plugins/modules/scaleway_lb_acl.py index 3537cd3..73f2126 100644 --- a/plugins/modules/scaleway_lb_acl.py +++ b/plugins/modules/scaleway_lb_acl.py @@ -7,103 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb_acl -short_description: Manage Scaleway lb's acl -description: - - This module can be used to manage Scaleway lb's acl. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - acl_id: - description: acl_id - type: str - required: false - frontend_id: - description: frontend_id - type: str - required: true - action: - description: action - type: dict - required: true - index: - description: index - type: int - required: true - description: - description: description - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - match: - description: match - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a acl - scaleway.scaleway.scaleway_lb_acl: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - frontend_id: "aaaaaa" - action: - aaaaaa: bbbbbb - cccccc: dddddd - index: "aaaaaa" - description: "aaaaaa" -""" - -RETURN = r""" ---- -acl: - description: The acl information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - match: - aaaaaa: bbbbbb - cccccc: dddddd - action: - aaaaaa: bbbbbb - cccccc: dddddd - frontend: - aaaaaa: bbbbbb - cccccc: dddddd - index: 3 - created_at: "aaaaaa" - updated_at: "aaaaaa" - description: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb_acl.yml b/plugins/modules/scaleway_lb_acl.yml new file mode 100644 index 0000000..79037dd --- /dev/null +++ b/plugins/modules/scaleway_lb_acl.yml @@ -0,0 +1,92 @@ +DOCUMENTATION: + module: scaleway_lb_acl + short_description: Manage Scaleway lb's acl + description: + - This module can be used to manage Scaleway lb's acl. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + acl_id: + description: acl_id + type: str + required: false + frontend_id: + description: frontend_id + type: str + required: true + action: + description: action + type: dict + required: true + index: + description: index + type: int + required: true + description: + description: description + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + match: + description: match + type: dict + required: false + +EXAMPLES: + - name: Create a acl + scaleway.scaleway.scaleway_lb_acl: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + frontend_id: "aaaaaa" + action: + aaaaaa: bbbbbb + cccccc: dddddd + index: "aaaaaa" + description: "aaaaaa" + +RETURN: + acl: + description: The acl information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + match: + aaaaaa: bbbbbb + cccccc: dddddd + action: + aaaaaa: bbbbbb + cccccc: dddddd + frontend: + aaaaaa: bbbbbb + cccccc: dddddd + index: 3 + created_at: "aaaaaa" + updated_at: "aaaaaa" + description: "aaaaaa" diff --git a/plugins/modules/scaleway_lb_backend.py b/plugins/modules/scaleway_lb_backend.py index 9d2ba42..c5c7224 100644 --- a/plugins/modules/scaleway_lb_backend.py +++ b/plugins/modules/scaleway_lb_backend.py @@ -7,193 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb_backend -short_description: Manage Scaleway lb's backend -description: - - This module can be used to manage Scaleway lb's backend. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - backend_id: - description: backend_id - type: str - required: false - lb_id: - description: lb_id - type: str - required: true - forward_port: - description: forward_port - type: int - required: true - sticky_sessions_cookie_name: - description: sticky_sessions_cookie_name - type: str - required: true - health_check: - description: health_check - type: dict - required: true - server_ip: - description: server_ip - type: list - elements: str - required: true - on_marked_down_action: - description: on_marked_down_action - type: str - required: true - choices: - - on_marked_down_action_none - - shutdown_sessions - proxy_protocol: - description: proxy_protocol - type: str - required: true - choices: - - proxy_protocol_unknown - - proxy_protocol_none - - proxy_protocol_v1 - - proxy_protocol_v2 - - proxy_protocol_v2_ssl - - proxy_protocol_v2_ssl_cn - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - forward_protocol: - description: forward_protocol - type: str - required: true - choices: - - tcp - - http - forward_port_algorithm: - description: forward_port_algorithm - type: str - required: true - choices: - - roundrobin - - leastconn - - first - sticky_sessions: - description: sticky_sessions - type: str - required: true - choices: - - none - - cookie - - table - send_proxy_v2: - description: send_proxy_v2 - type: bool - required: false - timeout_server: - description: timeout_server - type: str - required: false - timeout_connect: - description: timeout_connect - type: str - required: false - timeout_tunnel: - description: timeout_tunnel - type: str - required: false - failover_host: - description: failover_host - type: str - required: false - ssl_bridging: - description: ssl_bridging - type: bool - required: false - ignore_ssl_server_verify: - description: ignore_ssl_server_verify - type: bool - required: false -""" - -EXAMPLES = r""" -- name: Create a backend - scaleway.scaleway.scaleway_lb_backend: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - lb_id: "aaaaaa" - forward_port: "aaaaaa" - sticky_sessions_cookie_name: "aaaaaa" - health_check: - aaaaaa: bbbbbb - cccccc: dddddd - server_ip: - - aaaaaa - - bbbbbb - on_marked_down_action: "aaaaaa" - proxy_protocol: "aaaaaa" - forward_protocol: "aaaaaa" - forward_port_algorithm: "aaaaaa" - sticky_sessions: "aaaaaa" -""" - -RETURN = r""" ---- -backend: - description: The backend information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - forward_protocol: tcp - forward_port: 3 - forward_port_algorithm: roundrobin - sticky_sessions: none - sticky_sessions_cookie_name: "aaaaaa" - health_check: - aaaaaa: bbbbbb - cccccc: dddddd - pool: - - aaaaaa - - bbbbbb - lb: - aaaaaa: bbbbbb - cccccc: dddddd - send_proxy_v2: true - timeout_server: "aaaaaa" - timeout_connect: "aaaaaa" - timeout_tunnel: "aaaaaa" - on_marked_down_action: on_marked_down_action_none - proxy_protocol: proxy_protocol_none - created_at: "aaaaaa" - updated_at: "aaaaaa" - failover_host: "aaaaaa" - ssl_bridging: 00000000-0000-0000-0000-000000000000 - ignore_ssl_server_verify: true -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb_backend.yml b/plugins/modules/scaleway_lb_backend.yml new file mode 100644 index 0000000..c52c780 --- /dev/null +++ b/plugins/modules/scaleway_lb_backend.yml @@ -0,0 +1,182 @@ +DOCUMENTATION: + module: scaleway_lb_backend + short_description: Manage Scaleway lb's backend + description: + - This module can be used to manage Scaleway lb's backend. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + backend_id: + description: backend_id + type: str + required: false + lb_id: + description: lb_id + type: str + required: true + forward_port: + description: forward_port + type: int + required: true + sticky_sessions_cookie_name: + description: sticky_sessions_cookie_name + type: str + required: true + health_check: + description: health_check + type: dict + required: true + server_ip: + description: server_ip + type: list + elements: str + required: true + on_marked_down_action: + description: on_marked_down_action + type: str + required: true + choices: + - on_marked_down_action_none + - shutdown_sessions + proxy_protocol: + description: proxy_protocol + type: str + required: true + choices: + - proxy_protocol_unknown + - proxy_protocol_none + - proxy_protocol_v1 + - proxy_protocol_v2 + - proxy_protocol_v2_ssl + - proxy_protocol_v2_ssl_cn + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + forward_protocol: + description: forward_protocol + type: str + required: true + choices: + - tcp + - http + forward_port_algorithm: + description: forward_port_algorithm + type: str + required: true + choices: + - roundrobin + - leastconn + - first + sticky_sessions: + description: sticky_sessions + type: str + required: true + choices: + - none + - cookie + - table + send_proxy_v2: + description: send_proxy_v2 + type: bool + required: false + timeout_server: + description: timeout_server + type: str + required: false + timeout_connect: + description: timeout_connect + type: str + required: false + timeout_tunnel: + description: timeout_tunnel + type: str + required: false + failover_host: + description: failover_host + type: str + required: false + ssl_bridging: + description: ssl_bridging + type: bool + required: false + ignore_ssl_server_verify: + description: ignore_ssl_server_verify + type: bool + required: false + +EXAMPLES: + - name: Create a backend + scaleway.scaleway.scaleway_lb_backend: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + lb_id: "aaaaaa" + forward_port: "aaaaaa" + sticky_sessions_cookie_name: "aaaaaa" + health_check: + aaaaaa: bbbbbb + cccccc: dddddd + server_ip: + - aaaaaa + - bbbbbb + on_marked_down_action: "aaaaaa" + proxy_protocol: "aaaaaa" + forward_protocol: "aaaaaa" + forward_port_algorithm: "aaaaaa" + sticky_sessions: "aaaaaa" + +RETURN: + backend: + description: The backend information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + forward_protocol: tcp + forward_port: 3 + forward_port_algorithm: roundrobin + sticky_sessions: none + sticky_sessions_cookie_name: "aaaaaa" + health_check: + aaaaaa: bbbbbb + cccccc: dddddd + pool: + - aaaaaa + - bbbbbb + lb: + aaaaaa: bbbbbb + cccccc: dddddd + send_proxy_v2: true + timeout_server: "aaaaaa" + timeout_connect: "aaaaaa" + timeout_tunnel: "aaaaaa" + on_marked_down_action: on_marked_down_action_none + proxy_protocol: proxy_protocol_none + created_at: "aaaaaa" + updated_at: "aaaaaa" + failover_host: "aaaaaa" + ssl_bridging: 00000000-0000-0000-0000-000000000000 + ignore_ssl_server_verify: true diff --git a/plugins/modules/scaleway_lb_certificate.py b/plugins/modules/scaleway_lb_certificate.py index 95ebe23..5b959f7 100644 --- a/plugins/modules/scaleway_lb_certificate.py +++ b/plugins/modules/scaleway_lb_certificate.py @@ -7,92 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb_certificate -short_description: Manage Scaleway lb's certificate -description: - - This module can be used to manage Scaleway lb's certificate. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - certificate_id: - description: certificate_id - type: str - required: false - lb_id: - description: lb_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - letsencrypt: - description: letsencrypt - type: dict - required: false - custom_certificate: - description: custom_certificate - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a certificate - scaleway.scaleway.scaleway_lb_certificate: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - lb_id: "aaaaaa" -""" - -RETURN = r""" ---- -certificate: - description: The certificate information - returned: when I(state=present) - type: dict - sample: - type_: letsencryt - id: 00000000-0000-0000-0000-000000000000 - common_name: "aaaaaa" - subject_alternative_name: - - aaaaaa - - bbbbbb - fingerprint: "aaaaaa" - not_valid_before: 00000000-0000-0000-0000-000000000000 - not_valid_after: 00000000-0000-0000-0000-000000000000 - status: pending - lb: - aaaaaa: bbbbbb - cccccc: dddddd - name: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - status_details: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb_certificate.yml b/plugins/modules/scaleway_lb_certificate.yml new file mode 100644 index 0000000..a8a4679 --- /dev/null +++ b/plugins/modules/scaleway_lb_certificate.yml @@ -0,0 +1,81 @@ +DOCUMENTATION: + module: scaleway_lb_certificate + short_description: Manage Scaleway lb's certificate + description: + - This module can be used to manage Scaleway lb's certificate. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + certificate_id: + description: certificate_id + type: str + required: false + lb_id: + description: lb_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + letsencrypt: + description: letsencrypt + type: dict + required: false + custom_certificate: + description: custom_certificate + type: dict + required: false + +EXAMPLES: + - name: Create a certificate + scaleway.scaleway.scaleway_lb_certificate: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + lb_id: "aaaaaa" + +RETURN: + certificate: + description: The certificate information + returned: when I(state=present) + type: dict + sample: + type_: letsencryt + id: 00000000-0000-0000-0000-000000000000 + common_name: "aaaaaa" + subject_alternative_name: + - aaaaaa + - bbbbbb + fingerprint: "aaaaaa" + not_valid_before: 00000000-0000-0000-0000-000000000000 + not_valid_after: 00000000-0000-0000-0000-000000000000 + status: pending + lb: + aaaaaa: bbbbbb + cccccc: dddddd + name: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + status_details: "aaaaaa" diff --git a/plugins/modules/scaleway_lb_frontend.py b/plugins/modules/scaleway_lb_frontend.py index 4ef554c..3ddf3d4 100644 --- a/plugins/modules/scaleway_lb_frontend.py +++ b/plugins/modules/scaleway_lb_frontend.py @@ -7,112 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb_frontend -short_description: Manage Scaleway lb's frontend -description: - - This module can be used to manage Scaleway lb's frontend. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - frontend_id: - description: frontend_id - type: str - required: false - lb_id: - description: lb_id - type: str - required: true - inbound_port: - description: inbound_port - type: int - required: true - backend_id: - description: backend_id - type: str - required: true - enable_http3: - description: enable_http3 - type: bool - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - timeout_client: - description: timeout_client - type: str - required: false - certificate_id: - description: certificate_id - type: str - required: false - certificate_ids: - description: certificate_ids - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a frontend - scaleway.scaleway.scaleway_lb_frontend: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - lb_id: "aaaaaa" - inbound_port: "aaaaaa" - backend_id: "aaaaaa" - enable_http3: true -""" - -RETURN = r""" ---- -frontend: - description: The frontend information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - inbound_port: 3 - backend: - aaaaaa: bbbbbb - cccccc: dddddd - lb: - aaaaaa: bbbbbb - cccccc: dddddd - timeout_client: "aaaaaa" - certificate: - aaaaaa: bbbbbb - cccccc: dddddd - certificate_ids: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - enable_http3: true -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb_frontend.yml b/plugins/modules/scaleway_lb_frontend.yml new file mode 100644 index 0000000..8964fa3 --- /dev/null +++ b/plugins/modules/scaleway_lb_frontend.yml @@ -0,0 +1,101 @@ +DOCUMENTATION: + module: scaleway_lb_frontend + short_description: Manage Scaleway lb's frontend + description: + - This module can be used to manage Scaleway lb's frontend. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + frontend_id: + description: frontend_id + type: str + required: false + lb_id: + description: lb_id + type: str + required: true + inbound_port: + description: inbound_port + type: int + required: true + backend_id: + description: backend_id + type: str + required: true + enable_http3: + description: enable_http3 + type: bool + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + timeout_client: + description: timeout_client + type: str + required: false + certificate_id: + description: certificate_id + type: str + required: false + certificate_ids: + description: certificate_ids + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a frontend + scaleway.scaleway.scaleway_lb_frontend: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + lb_id: "aaaaaa" + inbound_port: "aaaaaa" + backend_id: "aaaaaa" + enable_http3: true + +RETURN: + frontend: + description: The frontend information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + inbound_port: 3 + backend: + aaaaaa: bbbbbb + cccccc: dddddd + lb: + aaaaaa: bbbbbb + cccccc: dddddd + timeout_client: "aaaaaa" + certificate: + aaaaaa: bbbbbb + cccccc: dddddd + certificate_ids: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + enable_http3: true diff --git a/plugins/modules/scaleway_lb_route.py b/plugins/modules/scaleway_lb_route.py index 4c0f4c3..ea17972 100644 --- a/plugins/modules/scaleway_lb_route.py +++ b/plugins/modules/scaleway_lb_route.py @@ -7,80 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb_route -short_description: Manage Scaleway lb's route -description: - - This module can be used to manage Scaleway lb's route. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - route_id: - description: route_id - type: str - required: false - frontend_id: - description: frontend_id - type: str - required: true - backend_id: - description: backend_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - match: - description: match - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a route - scaleway.scaleway.scaleway_lb_route: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - frontend_id: "aaaaaa" - backend_id: "aaaaaa" -""" - -RETURN = r""" ---- -route: - description: The route information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - frontend_id: 00000000-0000-0000-0000-000000000000 - backend_id: 00000000-0000-0000-0000-000000000000 - match: - aaaaaa: bbbbbb - cccccc: dddddd - created_at: "aaaaaa" - updated_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb_route.yml b/plugins/modules/scaleway_lb_route.yml new file mode 100644 index 0000000..728d842 --- /dev/null +++ b/plugins/modules/scaleway_lb_route.yml @@ -0,0 +1,69 @@ +DOCUMENTATION: + module: scaleway_lb_route + short_description: Manage Scaleway lb's route + description: + - This module can be used to manage Scaleway lb's route. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + route_id: + description: route_id + type: str + required: false + frontend_id: + description: frontend_id + type: str + required: true + backend_id: + description: backend_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + match: + description: match + type: dict + required: false + +EXAMPLES: + - name: Create a route + scaleway.scaleway.scaleway_lb_route: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + frontend_id: "aaaaaa" + backend_id: "aaaaaa" + +RETURN: + route: + description: The route information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + frontend_id: 00000000-0000-0000-0000-000000000000 + backend_id: 00000000-0000-0000-0000-000000000000 + match: + aaaaaa: bbbbbb + cccccc: dddddd + created_at: "aaaaaa" + updated_at: "aaaaaa" diff --git a/plugins/modules/scaleway_lb_subscriber.py b/plugins/modules/scaleway_lb_subscriber.py index 2c09f33..58146bf 100644 --- a/plugins/modules/scaleway_lb_subscriber.py +++ b/plugins/modules/scaleway_lb_subscriber.py @@ -7,87 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_lb_subscriber -short_description: Manage Scaleway lb's subscriber -description: - - This module can be used to manage Scaleway lb's subscriber. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - subscriber_id: - description: subscriber_id - type: str - required: false - name: - description: name - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - email_config: - description: email_config - type: dict - required: false - webhook_config: - description: webhook_config - type: dict - required: false - organization_id: - description: organization_id - type: str - required: false - project_id: - description: project_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a subscriber - scaleway.scaleway.scaleway_lb_subscriber: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - name: "aaaaaa" -""" - -RETURN = r""" ---- -subscriber: - description: The subscriber information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - email_config: - aaaaaa: bbbbbb - cccccc: dddddd - webhook_config: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_lb_subscriber.yml b/plugins/modules/scaleway_lb_subscriber.yml new file mode 100644 index 0000000..27d96fd --- /dev/null +++ b/plugins/modules/scaleway_lb_subscriber.yml @@ -0,0 +1,76 @@ +DOCUMENTATION: + module: scaleway_lb_subscriber + short_description: Manage Scaleway lb's subscriber + description: + - This module can be used to manage Scaleway lb's subscriber. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + subscriber_id: + description: subscriber_id + type: str + required: false + name: + description: name + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + email_config: + description: email_config + type: dict + required: false + webhook_config: + description: webhook_config + type: dict + required: false + organization_id: + description: organization_id + type: str + required: false + project_id: + description: project_id + type: str + required: false + +EXAMPLES: + - name: Create a subscriber + scaleway.scaleway.scaleway_lb_subscriber: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + name: "aaaaaa" + +RETURN: + subscriber: + description: The subscriber information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + email_config: + aaaaaa: bbbbbb + cccccc: dddddd + webhook_config: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_mnq_credential.py b/plugins/modules/scaleway_mnq_credential.py index 80aa9ef..3f2251d 100644 --- a/plugins/modules/scaleway_mnq_credential.py +++ b/plugins/modules/scaleway_mnq_credential.py @@ -7,81 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_mnq_credential -short_description: Manage Scaleway mnq's credential -description: - - This module can be used to manage Scaleway mnq's credential. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - credential_id: - description: credential_id - type: str - required: false - namespace_id: - description: namespace_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - permissions: - description: permissions - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a credential - scaleway.scaleway.scaleway_mnq_credential: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - namespace_id: "aaaaaa" -""" - -RETURN = r""" ---- -credential: - description: The credential information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - namespace_id: 00000000-0000-0000-0000-000000000000 - protocol: nats - nats_credentials: - aaaaaa: bbbbbb - cccccc: dddddd - sqs_sns_credentials: - aaaaaa: bbbbbb - cccccc: dddddd -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_mnq_credential.yml b/plugins/modules/scaleway_mnq_credential.yml new file mode 100644 index 0000000..4cc5499 --- /dev/null +++ b/plugins/modules/scaleway_mnq_credential.yml @@ -0,0 +1,70 @@ +DOCUMENTATION: + module: scaleway_mnq_credential + short_description: Manage Scaleway mnq's credential + description: + - This module can be used to manage Scaleway mnq's credential. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + credential_id: + description: credential_id + type: str + required: false + namespace_id: + description: namespace_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + permissions: + description: permissions + type: dict + required: false + +EXAMPLES: + - name: Create a credential + scaleway.scaleway.scaleway_mnq_credential: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + namespace_id: "aaaaaa" + +RETURN: + credential: + description: The credential information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + namespace_id: 00000000-0000-0000-0000-000000000000 + protocol: nats + nats_credentials: + aaaaaa: bbbbbb + cccccc: dddddd + sqs_sns_credentials: + aaaaaa: bbbbbb + cccccc: dddddd diff --git a/plugins/modules/scaleway_mnq_namespace.py b/plugins/modules/scaleway_mnq_namespace.py index 3938cf8..2162daa 100644 --- a/plugins/modules/scaleway_mnq_namespace.py +++ b/plugins/modules/scaleway_mnq_namespace.py @@ -7,83 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_mnq_namespace -short_description: Manage Scaleway mnq's namespace -description: - - This module can be used to manage Scaleway mnq's namespace. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - namespace_id: - description: namespace_id - type: str - required: false - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - protocol: - description: protocol - type: str - required: true - choices: - - unknown - - nats - - sqs_sns - project_id: - description: project_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a namespace - scaleway.scaleway.scaleway_mnq_namespace: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - protocol: "aaaaaa" -""" - -RETURN = r""" ---- -namespace: - description: The namespace information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - endpoint: "aaaaaa" - protocol: nats - project_id: 00000000-0000-0000-0000-000000000000 - region: fr-par - created_at: "aaaaaa" - updated_at: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_mnq_namespace.yml b/plugins/modules/scaleway_mnq_namespace.yml new file mode 100644 index 0000000..d8a0542 --- /dev/null +++ b/plugins/modules/scaleway_mnq_namespace.yml @@ -0,0 +1,72 @@ +DOCUMENTATION: + module: scaleway_mnq_namespace + short_description: Manage Scaleway mnq's namespace + description: + - This module can be used to manage Scaleway mnq's namespace. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + namespace_id: + description: namespace_id + type: str + required: false + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + protocol: + description: protocol + type: str + required: true + choices: + - unknown + - nats + - sqs_sns + project_id: + description: project_id + type: str + required: false + +EXAMPLES: + - name: Create a namespace + scaleway.scaleway.scaleway_mnq_namespace: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + protocol: "aaaaaa" + +RETURN: + namespace: + description: The namespace information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + endpoint: "aaaaaa" + protocol: nats + project_id: 00000000-0000-0000-0000-000000000000 + region: fr-par + created_at: "aaaaaa" + updated_at: "aaaaaa" diff --git a/plugins/modules/scaleway_rdb_database_backup.py b/plugins/modules/scaleway_rdb_database_backup.py index 8968f0a..3a087f9 100644 --- a/plugins/modules/scaleway_rdb_database_backup.py +++ b/plugins/modules/scaleway_rdb_database_backup.py @@ -7,90 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_rdb_database_backup -short_description: Manage Scaleway rdb's database_backup -description: - - This module can be used to manage Scaleway rdb's database_backup. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - database_backup_id: - description: database_backup_id - type: str - required: false - instance_id: - description: instance_id - type: str - required: true - database_name: - description: database_name - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - expires_at: - description: expires_at - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a database_backup - scaleway.scaleway.scaleway_rdb_database_backup: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - instance_id: "aaaaaa" - database_name: "aaaaaa" -""" - -RETURN = r""" ---- -database_backup: - description: The database_backup information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - instance_id: 00000000-0000-0000-0000-000000000000 - database_name: "aaaaaa" - name: "aaaaaa" - status: creating - size: 3 - expires_at: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - instance_name: "aaaaaa" - download_url: "aaaaaa" - download_url_expires_at: "aaaaaa" - region: fr-par - same_region: true -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_rdb_database_backup.yml b/plugins/modules/scaleway_rdb_database_backup.yml new file mode 100644 index 0000000..58ccd65 --- /dev/null +++ b/plugins/modules/scaleway_rdb_database_backup.yml @@ -0,0 +1,79 @@ +DOCUMENTATION: + module: scaleway_rdb_database_backup + short_description: Manage Scaleway rdb's database_backup + description: + - This module can be used to manage Scaleway rdb's database_backup. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + database_backup_id: + description: database_backup_id + type: str + required: false + instance_id: + description: instance_id + type: str + required: true + database_name: + description: database_name + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + expires_at: + description: expires_at + type: str + required: false + +EXAMPLES: + - name: Create a database_backup + scaleway.scaleway.scaleway_rdb_database_backup: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + instance_id: "aaaaaa" + database_name: "aaaaaa" + +RETURN: + database_backup: + description: The database_backup information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + instance_id: 00000000-0000-0000-0000-000000000000 + database_name: "aaaaaa" + name: "aaaaaa" + status: creating + size: 3 + expires_at: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + instance_name: "aaaaaa" + download_url: "aaaaaa" + download_url_expires_at: "aaaaaa" + region: fr-par + same_region: true diff --git a/plugins/modules/scaleway_rdb_endpoint.py b/plugins/modules/scaleway_rdb_endpoint.py index b259706..a74b5d3 100644 --- a/plugins/modules/scaleway_rdb_endpoint.py +++ b/plugins/modules/scaleway_rdb_endpoint.py @@ -7,81 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_rdb_endpoint -short_description: Manage Scaleway rdb's endpoint -description: - - This module can be used to manage Scaleway rdb's endpoint. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - endpoint_id: - description: endpoint_id - type: str - required: false - instance_id: - description: instance_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - endpoint_spec: - description: endpoint_spec - type: dict - required: false -""" - -EXAMPLES = r""" -- name: Create a endpoint - scaleway.scaleway.scaleway_rdb_endpoint: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - instance_id: "aaaaaa" -""" - -RETURN = r""" ---- -endpoint: - description: The endpoint information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - ip: "aaaaaa" - port: 3 - name: "aaaaaa" - private_network: - aaaaaa: bbbbbb - cccccc: dddddd - load_balancer: - aaaaaa: bbbbbb - cccccc: dddddd - direct_access: - aaaaaa: bbbbbb - cccccc: dddddd - hostname: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_rdb_endpoint.yml b/plugins/modules/scaleway_rdb_endpoint.yml new file mode 100644 index 0000000..c012f24 --- /dev/null +++ b/plugins/modules/scaleway_rdb_endpoint.yml @@ -0,0 +1,70 @@ +DOCUMENTATION: + module: scaleway_rdb_endpoint + short_description: Manage Scaleway rdb's endpoint + description: + - This module can be used to manage Scaleway rdb's endpoint. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + endpoint_id: + description: endpoint_id + type: str + required: false + instance_id: + description: instance_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + endpoint_spec: + description: endpoint_spec + type: dict + required: false + +EXAMPLES: + - name: Create a endpoint + scaleway.scaleway.scaleway_rdb_endpoint: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + instance_id: "aaaaaa" + +RETURN: + endpoint: + description: The endpoint information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + ip: "aaaaaa" + port: 3 + name: "aaaaaa" + private_network: + aaaaaa: bbbbbb + cccccc: dddddd + load_balancer: + aaaaaa: bbbbbb + cccccc: dddddd + direct_access: + aaaaaa: bbbbbb + cccccc: dddddd + hostname: "aaaaaa" diff --git a/plugins/modules/scaleway_rdb_instance.py b/plugins/modules/scaleway_rdb_instance.py index c7d9df3..8cfeb75 100644 --- a/plugins/modules/scaleway_rdb_instance.py +++ b/plugins/modules/scaleway_rdb_instance.py @@ -7,177 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_rdb_instance -short_description: Manage Scaleway rdb's instance -description: - - This module can be used to manage Scaleway rdb's instance. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - instance_id: - description: instance_id - type: str - required: false - engine: - description: engine - type: str - required: true - user_name: - description: user_name - type: str - required: true - password: - description: password - type: str - required: true - node_type: - description: node_type - type: str - required: true - is_ha_cluster: - description: is_ha_cluster - type: bool - required: true - disable_backup: - description: disable_backup - type: bool - required: true - volume_type: - description: volume_type - type: str - required: true - choices: - - lssd - - bssd - volume_size: - description: volume_size - type: int - required: true - backup_same_region: - description: backup_same_region - type: bool - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - organization_id: - description: organization_id - type: str - required: false - project_id: - description: project_id - type: str - required: false - name: - description: name - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - init_settings: - description: init_settings - type: list - elements: str - required: false - init_endpoints: - description: init_endpoints - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a instance - scaleway.scaleway.scaleway_rdb_instance: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - engine: "aaaaaa" - user_name: "aaaaaa" - password: "aaaaaa" - node_type: "aaaaaa" - is_ha_cluster: true - disable_backup: true - volume_type: "aaaaaa" - volume_size: "aaaaaa" - backup_same_region: true -""" - -RETURN = r""" ---- -instance: - description: The instance information - returned: when I(state=present) - type: dict - sample: - created_at: "aaaaaa" - volume: - aaaaaa: bbbbbb - cccccc: dddddd - region: fr-par - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - status: ready - engine: "aaaaaa" - upgradable_version: - - aaaaaa - - bbbbbb - endpoint: - aaaaaa: bbbbbb - cccccc: dddddd - tags: - - aaaaaa - - bbbbbb - settings: - - aaaaaa - - bbbbbb - backup_schedule: - aaaaaa: bbbbbb - cccccc: dddddd - is_ha_cluster: true - read_replicas: - - aaaaaa - - bbbbbb - node_type: "aaaaaa" - init_settings: - - aaaaaa - - bbbbbb - endpoints: - - aaaaaa - - bbbbbb - logs_policy: - aaaaaa: bbbbbb - cccccc: dddddd - backup_same_region: true - maintenances: - - aaaaaa - - bbbbbb -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_rdb_instance.yml b/plugins/modules/scaleway_rdb_instance.yml new file mode 100644 index 0000000..5724b94 --- /dev/null +++ b/plugins/modules/scaleway_rdb_instance.yml @@ -0,0 +1,166 @@ +DOCUMENTATION: + module: scaleway_rdb_instance + short_description: Manage Scaleway rdb's instance + description: + - This module can be used to manage Scaleway rdb's instance. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + instance_id: + description: instance_id + type: str + required: false + engine: + description: engine + type: str + required: true + user_name: + description: user_name + type: str + required: true + password: + description: password + type: str + required: true + node_type: + description: node_type + type: str + required: true + is_ha_cluster: + description: is_ha_cluster + type: bool + required: true + disable_backup: + description: disable_backup + type: bool + required: true + volume_type: + description: volume_type + type: str + required: true + choices: + - lssd + - bssd + volume_size: + description: volume_size + type: int + required: true + backup_same_region: + description: backup_same_region + type: bool + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + organization_id: + description: organization_id + type: str + required: false + project_id: + description: project_id + type: str + required: false + name: + description: name + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + init_settings: + description: init_settings + type: list + elements: str + required: false + init_endpoints: + description: init_endpoints + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a instance + scaleway.scaleway.scaleway_rdb_instance: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + engine: "aaaaaa" + user_name: "aaaaaa" + password: "aaaaaa" + node_type: "aaaaaa" + is_ha_cluster: true + disable_backup: true + volume_type: "aaaaaa" + volume_size: "aaaaaa" + backup_same_region: true + +RETURN: + instance: + description: The instance information + returned: when I(state=present) + type: dict + sample: + created_at: "aaaaaa" + volume: + aaaaaa: bbbbbb + cccccc: dddddd + region: fr-par + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + status: ready + engine: "aaaaaa" + upgradable_version: + - aaaaaa + - bbbbbb + endpoint: + aaaaaa: bbbbbb + cccccc: dddddd + tags: + - aaaaaa + - bbbbbb + settings: + - aaaaaa + - bbbbbb + backup_schedule: + aaaaaa: bbbbbb + cccccc: dddddd + is_ha_cluster: true + read_replicas: + - aaaaaa + - bbbbbb + node_type: "aaaaaa" + init_settings: + - aaaaaa + - bbbbbb + endpoints: + - aaaaaa + - bbbbbb + logs_policy: + aaaaaa: bbbbbb + cccccc: dddddd + backup_same_region: true + maintenances: + - aaaaaa + - bbbbbb diff --git a/plugins/modules/scaleway_rdb_read_replica.py b/plugins/modules/scaleway_rdb_read_replica.py index 4784e98..865c19d 100644 --- a/plugins/modules/scaleway_rdb_read_replica.py +++ b/plugins/modules/scaleway_rdb_read_replica.py @@ -7,74 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_rdb_read_replica -short_description: Manage Scaleway rdb's read_replica -description: - - This module can be used to manage Scaleway rdb's read_replica. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - read_replica_id: - description: read_replica_id - type: str - required: false - instance_id: - description: instance_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - endpoint_spec: - description: endpoint_spec - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a read_replica - scaleway.scaleway.scaleway_rdb_read_replica: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - instance_id: "aaaaaa" -""" - -RETURN = r""" ---- -read_replica: - description: The read_replica information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - endpoints: - - aaaaaa - - bbbbbb - status: provisioning - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_rdb_read_replica.yml b/plugins/modules/scaleway_rdb_read_replica.yml new file mode 100644 index 0000000..19fd4e5 --- /dev/null +++ b/plugins/modules/scaleway_rdb_read_replica.yml @@ -0,0 +1,63 @@ +DOCUMENTATION: + module: scaleway_rdb_read_replica + short_description: Manage Scaleway rdb's read_replica + description: + - This module can be used to manage Scaleway rdb's read_replica. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + read_replica_id: + description: read_replica_id + type: str + required: false + instance_id: + description: instance_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + endpoint_spec: + description: endpoint_spec + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a read_replica + scaleway.scaleway.scaleway_rdb_read_replica: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + instance_id: "aaaaaa" + +RETURN: + read_replica: + description: The read_replica information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + endpoints: + - aaaaaa + - bbbbbb + status: provisioning + region: fr-par diff --git a/plugins/modules/scaleway_rdb_snapshot.py b/plugins/modules/scaleway_rdb_snapshot.py index 7352c54..6d51cca 100644 --- a/plugins/modules/scaleway_rdb_snapshot.py +++ b/plugins/modules/scaleway_rdb_snapshot.py @@ -7,82 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_rdb_snapshot -short_description: Manage Scaleway rdb's snapshot -description: - - This module can be used to manage Scaleway rdb's snapshot. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - snapshot_id: - description: snapshot_id - type: str - required: false - instance_id: - description: instance_id - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - expires_at: - description: expires_at - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a snapshot - scaleway.scaleway.scaleway_rdb_snapshot: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - instance_id: "aaaaaa" -""" - -RETURN = r""" ---- -snapshot: - description: The snapshot information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - instance_id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - status: creating - size: 3 - expires_at: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - instance_name: "aaaaaa" - node_type: "aaaaaa" - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_rdb_snapshot.yml b/plugins/modules/scaleway_rdb_snapshot.yml new file mode 100644 index 0000000..f6f2ef4 --- /dev/null +++ b/plugins/modules/scaleway_rdb_snapshot.yml @@ -0,0 +1,71 @@ +DOCUMENTATION: + module: scaleway_rdb_snapshot + short_description: Manage Scaleway rdb's snapshot + description: + - This module can be used to manage Scaleway rdb's snapshot. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + snapshot_id: + description: snapshot_id + type: str + required: false + instance_id: + description: instance_id + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + expires_at: + description: expires_at + type: str + required: false + +EXAMPLES: + - name: Create a snapshot + scaleway.scaleway.scaleway_rdb_snapshot: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + instance_id: "aaaaaa" + +RETURN: + snapshot: + description: The snapshot information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + instance_id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + status: creating + size: 3 + expires_at: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + instance_name: "aaaaaa" + node_type: "aaaaaa" + region: fr-par diff --git a/plugins/modules/scaleway_redis_cluster.py b/plugins/modules/scaleway_redis_cluster.py index 0b5b5c5..b946b6f 100644 --- a/plugins/modules/scaleway_redis_cluster.py +++ b/plugins/modules/scaleway_redis_cluster.py @@ -7,138 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_redis_cluster -short_description: Manage Scaleway redis's cluster -description: - - This module can be used to manage Scaleway redis's cluster. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - cluster_id: - description: cluster_id - type: str - required: false - version: - description: version - type: str - required: true - node_type: - description: node_type - type: str - required: true - user_name: - description: user_name - type: str - required: true - password: - description: password - type: str - required: true - tls_enabled: - description: tls_enabled - type: bool - required: true - zone: - description: zone - type: str - required: false - project_id: - description: project_id - type: str - required: false - name: - description: name - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - cluster_size: - description: cluster_size - type: int - required: false - acl_rules: - description: acl_rules - type: list - elements: str - required: false - endpoints: - description: endpoints - type: list - elements: str - required: false - cluster_settings: - description: cluster_settings - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a cluster - scaleway.scaleway.scaleway_redis_cluster: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - version: "aaaaaa" - node_type: "aaaaaa" - user_name: "aaaaaa" - password: "aaaaaa" - tls_enabled: true -""" - -RETURN = r""" ---- -cluster: - description: The cluster information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - project_id: 00000000-0000-0000-0000-000000000000 - status: ready - version: "aaaaaa" - endpoints: - - aaaaaa - - bbbbbb - tags: - - aaaaaa - - bbbbbb - node_type: "aaaaaa" - created_at: "aaaaaa" - updated_at: "aaaaaa" - tls_enabled: true - cluster_settings: - - aaaaaa - - bbbbbb - acl_rules: - - aaaaaa - - bbbbbb - cluster_size: 3 - zone: "aaaaaa" - user_name: "aaaaaa" - upgradable_versions: - - aaaaaa - - bbbbbb -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_redis_cluster.yml b/plugins/modules/scaleway_redis_cluster.yml new file mode 100644 index 0000000..5cc0a17 --- /dev/null +++ b/plugins/modules/scaleway_redis_cluster.yml @@ -0,0 +1,127 @@ +DOCUMENTATION: + module: scaleway_redis_cluster + short_description: Manage Scaleway redis's cluster + description: + - This module can be used to manage Scaleway redis's cluster. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + cluster_id: + description: cluster_id + type: str + required: false + version: + description: version + type: str + required: true + node_type: + description: node_type + type: str + required: true + user_name: + description: user_name + type: str + required: true + password: + description: password + type: str + required: true + tls_enabled: + description: tls_enabled + type: bool + required: true + zone: + description: zone + type: str + required: false + project_id: + description: project_id + type: str + required: false + name: + description: name + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + cluster_size: + description: cluster_size + type: int + required: false + acl_rules: + description: acl_rules + type: list + elements: str + required: false + endpoints: + description: endpoints + type: list + elements: str + required: false + cluster_settings: + description: cluster_settings + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a cluster + scaleway.scaleway.scaleway_redis_cluster: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + version: "aaaaaa" + node_type: "aaaaaa" + user_name: "aaaaaa" + password: "aaaaaa" + tls_enabled: true + +RETURN: + cluster: + description: The cluster information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + project_id: 00000000-0000-0000-0000-000000000000 + status: ready + version: "aaaaaa" + endpoints: + - aaaaaa + - bbbbbb + tags: + - aaaaaa + - bbbbbb + node_type: "aaaaaa" + created_at: "aaaaaa" + updated_at: "aaaaaa" + tls_enabled: true + cluster_settings: + - aaaaaa + - bbbbbb + acl_rules: + - aaaaaa + - bbbbbb + cluster_size: 3 + zone: "aaaaaa" + user_name: "aaaaaa" + upgradable_versions: + - aaaaaa + - bbbbbb diff --git a/plugins/modules/scaleway_registry_namespace.py b/plugins/modules/scaleway_registry_namespace.py index 938d3e5..dc8b16d 100644 --- a/plugins/modules/scaleway_registry_namespace.py +++ b/plugins/modules/scaleway_registry_namespace.py @@ -7,94 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_registry_namespace -short_description: Manage Scaleway registry's namespace -description: - - This module can be used to manage Scaleway registry's namespace. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - namespace_id: - description: namespace_id - type: str - required: false - description: - description: description - type: str - required: true - is_public: - description: is_public - type: bool - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - name: - description: name - type: str - required: false - organization_id: - description: organization_id - type: str - required: false - project_id: - description: project_id - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a namespace - scaleway.scaleway.scaleway_registry_namespace: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - description: "aaaaaa" - is_public: true -""" - -RETURN = r""" ---- -namespace: - description: The namespace information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - description: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - status: ready - status_message: "aaaaaa" - endpoint: "aaaaaa" - is_public: true - size: 3 - created_at: "aaaaaa" - updated_at: "aaaaaa" - image_count: 3 - region: fr-par -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_registry_namespace.yml b/plugins/modules/scaleway_registry_namespace.yml new file mode 100644 index 0000000..6cc5ecd --- /dev/null +++ b/plugins/modules/scaleway_registry_namespace.yml @@ -0,0 +1,83 @@ +DOCUMENTATION: + module: scaleway_registry_namespace + short_description: Manage Scaleway registry's namespace + description: + - This module can be used to manage Scaleway registry's namespace. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + namespace_id: + description: namespace_id + type: str + required: false + description: + description: description + type: str + required: true + is_public: + description: is_public + type: bool + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + name: + description: name + type: str + required: false + organization_id: + description: organization_id + type: str + required: false + project_id: + description: project_id + type: str + required: false + +EXAMPLES: + - name: Create a namespace + scaleway.scaleway.scaleway_registry_namespace: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + description: "aaaaaa" + is_public: true + +RETURN: + namespace: + description: The namespace information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + description: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + status: ready + status_message: "aaaaaa" + endpoint: "aaaaaa" + is_public: true + size: 3 + created_at: "aaaaaa" + updated_at: "aaaaaa" + image_count: 3 + region: fr-par diff --git a/plugins/modules/scaleway_secret.py b/plugins/modules/scaleway_secret.py index fecad6d..44a274f 100644 --- a/plugins/modules/scaleway_secret.py +++ b/plugins/modules/scaleway_secret.py @@ -7,88 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_secret -short_description: Manage Scaleway secret's secret -description: - - This module can be used to manage Scaleway secret's secret. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - secret_id: - description: secret_id - type: str - required: false - name: - description: name - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - project_id: - description: project_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - description: - description: description - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a secret - scaleway.scaleway.scaleway_secret: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - name: "aaaaaa" -""" - -RETURN = r""" ---- -secret: - description: The secret information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - status: ready - created_at: "aaaaaa" - updated_at: "aaaaaa" - tags: - - aaaaaa - - bbbbbb - region: fr-par - version_count: 3 - description: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_secret.yml b/plugins/modules/scaleway_secret.yml new file mode 100644 index 0000000..6702e45 --- /dev/null +++ b/plugins/modules/scaleway_secret.yml @@ -0,0 +1,77 @@ +DOCUMENTATION: + module: scaleway_secret + short_description: Manage Scaleway secret's secret + description: + - This module can be used to manage Scaleway secret's secret. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + secret_id: + description: secret_id + type: str + required: false + name: + description: name + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + project_id: + description: project_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + description: + description: description + type: str + required: false + +EXAMPLES: + - name: Create a secret + scaleway.scaleway.scaleway_secret: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + name: "aaaaaa" + +RETURN: + secret: + description: The secret information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + status: ready + created_at: "aaaaaa" + updated_at: "aaaaaa" + tags: + - aaaaaa + - bbbbbb + region: fr-par + version_count: 3 + description: "aaaaaa" diff --git a/plugins/modules/scaleway_secret_version.py b/plugins/modules/scaleway_secret_version.py index 3b40dbf..b16be00 100644 --- a/plugins/modules/scaleway_secret_version.py +++ b/plugins/modules/scaleway_secret_version.py @@ -7,128 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_secret_version -short_description: Manage Scaleway secret's secret version -description: - - This module can be used to manage Scaleway secret's secret version. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create a new secret's version. If the secret does not exist, it will be created. - - C(absent) will delete the secret version, if it exists. - - C(disable) will disable the secret version, if it exists. - - C(enable) will enable the secret version, if it exists. - - C(access) will access the secret version, if it exists. - default: present - choices: ["present", "absent", "disable", "enable", "access"] - type: str - secret_id: - description: secret_id - type: str - required: false - name: - description: secret's name - type: str - required: true - region: - description: region - type: str - required: false - choices: - - fr-par - - nl-ams - - pl-waw - project_id: - description: project_id - type: str - required: false - disable_previous: - description: when creating a new version, disable the previous version - type: bool - required: false - destroy_previous: - description: when creating a new version, destroy the previous version - type: bool - required: false - revision: - description: revision - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - description: - description: description - type: str - required: false - data: - description: the secret value - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a version of the secret and disable the previous version - scaleway.scaleway.scaleway_secret_version: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - project_id: "{{ scw_project_id }}" - region: "{{ scw_region }}" - name: "aaaaaa" - state: "present" - disable_previous: true - data: "{{ data }}" - -- name: access the latest version of the secret - scaleway.scaleway.scaleway_secret_access: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - project_id: "{{ scw_project_id }}" - region: "{{ scw_region }}" - name: "aaaaaa" - register: data -""" - -RETURN = r""" ---- -secret_version: - description: The secret version data - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - status: ready - created_at: "1970-01-01T00:00:00.000000+00:00" - updated_at: "1970-01-01T00:00:00.000000+00:00" - tags: - - aaaaaa - - bbbbbb - region: fr-par - version_count: 3 - description: "foobar" - -secret_data: - description: The value of secret version data - returned: when I(state=access) - type: dict - sample: - data: "my_secret_data" -""" import base64 @@ -203,7 +81,7 @@ def create(module: AnsibleModule, client: "Client") -> None: module.exit_json( changed=True, - msg=f"secret {secret.name} ({secret.id}) revision { secret_version.revision }]\ + msg=f"secret {secret.name} ({secret.id}) revision {secret_version.revision}]\ has been created", data=secret.__dict__, ) @@ -231,7 +109,7 @@ def delete(module: AnsibleModule, client: "Client") -> None: module.exit_json( changed=True, - msg=f"secret's {secret.name} ({secret.id}) revision{ revision } has been deleted", + msg=f"secret's {secret.name} ({secret.id}) revision {revision} has been deleted", ) @@ -263,7 +141,6 @@ def access(module: AnsibleModule, client: "Client") -> None: def enable(module: AnsibleModule, client: "Client") -> None: api = SecretV1Alpha1API(client) region = module.params.pop("region", None) - project_id = module.params.pop("project_id", None) name = module.params.pop("name", None) id = module.params.pop("id", None) revision = module.params.pop("revision", None) @@ -278,7 +155,7 @@ def enable(module: AnsibleModule, client: "Client") -> None: module.exit_json( changed=True, - msg=f"secret's secret {secret.name} ({secret.id}) revision {revision } has been disabled", + msg=f"secret's secret {secret.name} ({secret.id}) revision {revision} has been disabled", data=secret.__dict__, ) @@ -305,7 +182,7 @@ def disable(module: AnsibleModule, client: "Client") -> None: module.exit_json( changed=True, - msg=f"secret's secret {secret.name} ({secret.id}) revision { revision } has been disabled", + msg=f"secret's secret {secret.name} ({secret.id}) revision {revision} has been disabled", ) diff --git a/plugins/modules/scaleway_secret_version.yml b/plugins/modules/scaleway_secret_version.yml new file mode 100644 index 0000000..61648e5 --- /dev/null +++ b/plugins/modules/scaleway_secret_version.yml @@ -0,0 +1,117 @@ +DOCUMENTATION: + module: scaleway_secret_version + short_description: Manage Scaleway secret's secret version + description: + - This module can be used to manage Scaleway secret's secret version. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create a new secret's version. If the secret does not exist, it will be created. + - C(absent) will delete the secret version, if it exists. + - C(disable) will disable the secret version, if it exists. + - C(enable) will enable the secret version, if it exists. + - C(access) will access the secret version, if it exists. + default: present + choices: ["present", "absent", "disable", "enable", "access"] + type: str + secret_id: + description: secret_id + type: str + required: false + name: + description: secret's name + type: str + required: true + region: + description: region + type: str + required: false + choices: + - fr-par + - nl-ams + - pl-waw + project_id: + description: project_id + type: str + required: false + disable_previous: + description: when creating a new version, disable the previous version + type: bool + required: false + destroy_previous: + description: when creating a new version, destroy the previous version + type: bool + required: false + revision: + description: revision + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + description: + description: description + type: str + required: false + data: + description: the secret value + type: str + required: false + +EXAMPLES: + - name: Create a version of the secret and disable the previous version + scaleway.scaleway.scaleway_secret_version: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + project_id: "{{ scw_project_id }}" + region: "{{ scw_region }}" + name: "aaaaaa" + state: "present" + disable_previous: true + data: "{{ data }}" + + - name: access the latest version of the secret + scaleway.scaleway.scaleway_secret_access: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + project_id: "{{ scw_project_id }}" + region: "{{ scw_region }}" + name: "aaaaaa" + register: data + +RETURN: + secret_version: + description: The secret version data + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + status: ready + created_at: "1970-01-01T00:00:00.000000+00:00" + updated_at: "1970-01-01T00:00:00.000000+00:00" + tags: + - aaaaaa + - bbbbbb + region: fr-par + version_count: 3 + description: "foobar" + + secret_data: + description: The value of secret version data + returned: when I(state=access) + type: dict + sample: + data: "my_secret_data" diff --git a/plugins/modules/scaleway_vpc_private_network.py b/plugins/modules/scaleway_vpc_private_network.py index 650dd3f..4ae70d6 100644 --- a/plugins/modules/scaleway_vpc_private_network.py +++ b/plugins/modules/scaleway_vpc_private_network.py @@ -7,85 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpc_private_network -short_description: Manage Scaleway vpc's private_network -description: - - This module can be used to manage Scaleway vpc's private_network. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - private_network_id: - description: private_network_id - type: str - required: false - zone: - description: zone - type: str - required: false - name: - description: name - type: str - required: false - project_id: - description: project_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - subnets: - description: subnets - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a private_network - scaleway.scaleway.scaleway_vpc_private_network: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -private_network: - description: The private_network information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - name: "aaaaaa" - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - zone: "aaaaaa" - tags: - - aaaaaa - - bbbbbb - created_at: "aaaaaa" - updated_at: "aaaaaa" - subnets: - - aaaaaa - - bbbbbb -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpc_private_network.yml b/plugins/modules/scaleway_vpc_private_network.yml new file mode 100644 index 0000000..990b553 --- /dev/null +++ b/plugins/modules/scaleway_vpc_private_network.yml @@ -0,0 +1,74 @@ +DOCUMENTATION: + module: scaleway_vpc_private_network + short_description: Manage Scaleway vpc's private_network + description: + - This module can be used to manage Scaleway vpc's private_network. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + private_network_id: + description: private_network_id + type: str + required: false + zone: + description: zone + type: str + required: false + name: + description: name + type: str + required: false + project_id: + description: project_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + subnets: + description: subnets + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a private_network + scaleway.scaleway.scaleway_vpc_private_network: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + +RETURN: + private_network: + description: The private_network information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + name: "aaaaaa" + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + zone: "aaaaaa" + tags: + - aaaaaa + - bbbbbb + created_at: "aaaaaa" + updated_at: "aaaaaa" + subnets: + - aaaaaa + - bbbbbb diff --git a/plugins/modules/scaleway_vpcgw_dhcp.py b/plugins/modules/scaleway_vpcgw_dhcp.py index 91cdf3c..1fdfd45 100644 --- a/plugins/modules/scaleway_vpcgw_dhcp.py +++ b/plugins/modules/scaleway_vpcgw_dhcp.py @@ -7,134 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpcgw_dhcp -short_description: Manage Scaleway vpcgw's dhcp -description: - - This module can be used to manage Scaleway vpcgw's dhcp. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - dhcp_id: - description: dhcp_id - type: str - required: false - subnet: - description: subnet - type: str - required: true - zone: - description: zone - type: str - required: false - project_id: - description: project_id - type: str - required: false - address: - description: address - type: str - required: false - pool_low: - description: pool_low - type: str - required: false - pool_high: - description: pool_high - type: str - required: false - enable_dynamic: - description: enable_dynamic - type: bool - required: false - valid_lifetime: - description: valid_lifetime - type: str - required: false - renew_timer: - description: renew_timer - type: str - required: false - rebind_timer: - description: rebind_timer - type: str - required: false - push_default_route: - description: push_default_route - type: bool - required: false - push_dns_server: - description: push_dns_server - type: bool - required: false - dns_servers_override: - description: dns_servers_override - type: list - elements: str - required: false - dns_search: - description: dns_search - type: list - elements: str - required: false - dns_local_name: - description: dns_local_name - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a dhcp - scaleway.scaleway.scaleway_vpcgw_dhcp: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - subnet: "aaaaaa" -""" - -RETURN = r""" ---- -dhcp: - description: The dhcp information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - subnet: "aaaaaa" - address: "aaaaaa" - pool_low: "aaaaaa" - pool_high: "aaaaaa" - enable_dynamic: true - valid_lifetime: 00000000-0000-0000-0000-000000000000 - renew_timer: "aaaaaa" - rebind_timer: "aaaaaa" - push_default_route: true - push_dns_server: true - dns_servers_override: 00000000-0000-0000-0000-000000000000 - dns_search: - - aaaaaa - - bbbbbb - dns_local_name: "aaaaaa" - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpcgw_dhcp.yml b/plugins/modules/scaleway_vpcgw_dhcp.yml new file mode 100644 index 0000000..b7662c5 --- /dev/null +++ b/plugins/modules/scaleway_vpcgw_dhcp.yml @@ -0,0 +1,123 @@ +DOCUMENTATION: + module: scaleway_vpcgw_dhcp + short_description: Manage Scaleway vpcgw's dhcp + description: + - This module can be used to manage Scaleway vpcgw's dhcp. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + dhcp_id: + description: dhcp_id + type: str + required: false + subnet: + description: subnet + type: str + required: true + zone: + description: zone + type: str + required: false + project_id: + description: project_id + type: str + required: false + address: + description: address + type: str + required: false + pool_low: + description: pool_low + type: str + required: false + pool_high: + description: pool_high + type: str + required: false + enable_dynamic: + description: enable_dynamic + type: bool + required: false + valid_lifetime: + description: valid_lifetime + type: str + required: false + renew_timer: + description: renew_timer + type: str + required: false + rebind_timer: + description: rebind_timer + type: str + required: false + push_default_route: + description: push_default_route + type: bool + required: false + push_dns_server: + description: push_dns_server + type: bool + required: false + dns_servers_override: + description: dns_servers_override + type: list + elements: str + required: false + dns_search: + description: dns_search + type: list + elements: str + required: false + dns_local_name: + description: dns_local_name + type: str + required: false + +EXAMPLES: + - name: Create a dhcp + scaleway.scaleway.scaleway_vpcgw_dhcp: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + subnet: "aaaaaa" + +RETURN: + dhcp: + description: The dhcp information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + subnet: "aaaaaa" + address: "aaaaaa" + pool_low: "aaaaaa" + pool_high: "aaaaaa" + enable_dynamic: true + valid_lifetime: 00000000-0000-0000-0000-000000000000 + renew_timer: "aaaaaa" + rebind_timer: "aaaaaa" + push_default_route: true + push_dns_server: true + dns_servers_override: 00000000-0000-0000-0000-000000000000 + dns_search: + - aaaaaa + - bbbbbb + dns_local_name: "aaaaaa" + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_vpcgw_dhcp_entry.py b/plugins/modules/scaleway_vpcgw_dhcp_entry.py index 9e09c1e..bfc769a 100644 --- a/plugins/modules/scaleway_vpcgw_dhcp_entry.py +++ b/plugins/modules/scaleway_vpcgw_dhcp_entry.py @@ -7,78 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpcgw_dhcp_entry -short_description: Manage Scaleway vpcgw's dhcp_entry -description: - - This module can be used to manage Scaleway vpcgw's dhcp_entry. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - dhcp_entry_id: - description: dhcp_entry_id - type: str - required: false - gateway_network_id: - description: gateway_network_id - type: str - required: true - mac_address: - description: mac_address - type: str - required: true - ip_address: - description: ip_address - type: str - required: true - zone: - description: zone - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a dhcp_entry - scaleway.scaleway.scaleway_vpcgw_dhcp_entry: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - gateway_network_id: "aaaaaa" - mac_address: "aaaaaa" - ip_address: "aaaaaa" -""" - -RETURN = r""" ---- -dhcp_entry: - description: The dhcp_entry information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - gateway_network_id: 00000000-0000-0000-0000-000000000000 - mac_address: "aaaaaa" - ip_address: "aaaaaa" - hostname: "aaaaaa" - type_: reservation - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpcgw_dhcp_entry.yml b/plugins/modules/scaleway_vpcgw_dhcp_entry.yml new file mode 100644 index 0000000..b137e01 --- /dev/null +++ b/plugins/modules/scaleway_vpcgw_dhcp_entry.yml @@ -0,0 +1,67 @@ +DOCUMENTATION: + module: scaleway_vpcgw_dhcp_entry + short_description: Manage Scaleway vpcgw's dhcp_entry + description: + - This module can be used to manage Scaleway vpcgw's dhcp_entry. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + dhcp_entry_id: + description: dhcp_entry_id + type: str + required: false + gateway_network_id: + description: gateway_network_id + type: str + required: true + mac_address: + description: mac_address + type: str + required: true + ip_address: + description: ip_address + type: str + required: true + zone: + description: zone + type: str + required: false + +EXAMPLES: + - name: Create a dhcp_entry + scaleway.scaleway.scaleway_vpcgw_dhcp_entry: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + gateway_network_id: "aaaaaa" + mac_address: "aaaaaa" + ip_address: "aaaaaa" + +RETURN: + dhcp_entry: + description: The dhcp_entry information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + gateway_network_id: 00000000-0000-0000-0000-000000000000 + mac_address: "aaaaaa" + ip_address: "aaaaaa" + hostname: "aaaaaa" + type_: reservation + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_vpcgw_gateway.py b/plugins/modules/scaleway_vpcgw_gateway.py index bcc8122..141b10e 100644 --- a/plugins/modules/scaleway_vpcgw_gateway.py +++ b/plugins/modules/scaleway_vpcgw_gateway.py @@ -7,123 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpcgw_gateway -short_description: Manage Scaleway vpcgw's gateway -description: - - This module can be used to manage Scaleway vpcgw's gateway. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - gateway_id: - description: gateway_id - type: str - required: false - type_: - description: type_ - type: str - required: true - enable_smtp: - description: enable_smtp - type: bool - required: true - enable_bastion: - description: enable_bastion - type: bool - required: true - zone: - description: zone - type: str - required: false - project_id: - description: project_id - type: str - required: false - name: - description: name - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false - upstream_dns_servers: - description: upstream_dns_servers - type: list - elements: str - required: false - ip_id: - description: ip_id - type: str - required: false - bastion_port: - description: bastion_port - type: int - required: false -""" - -EXAMPLES = r""" -- name: Create a gateway - scaleway.scaleway.scaleway_vpcgw_gateway: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - type_: "aaaaaa" - enable_smtp: true - enable_bastion: true -""" - -RETURN = r""" ---- -gateway: - description: The gateway information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - type_: - aaaaaa: bbbbbb - cccccc: dddddd - status: stopped - name: "aaaaaa" - tags: - - aaaaaa - - bbbbbb - ip: - aaaaaa: bbbbbb - cccccc: dddddd - gateway_networks: - - aaaaaa - - bbbbbb - upstream_dns_servers: - - aaaaaa - - bbbbbb - version: "aaaaaa" - can_upgrade_to: "aaaaaa" - bastion_enabled: true - bastion_port: 3 - smtp_enabled: true - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpcgw_gateway.yml b/plugins/modules/scaleway_vpcgw_gateway.yml new file mode 100644 index 0000000..64c071d --- /dev/null +++ b/plugins/modules/scaleway_vpcgw_gateway.yml @@ -0,0 +1,112 @@ +DOCUMENTATION: + module: scaleway_vpcgw_gateway + short_description: Manage Scaleway vpcgw's gateway + description: + - This module can be used to manage Scaleway vpcgw's gateway. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + gateway_id: + description: gateway_id + type: str + required: false + type_: + description: type_ + type: str + required: true + enable_smtp: + description: enable_smtp + type: bool + required: true + enable_bastion: + description: enable_bastion + type: bool + required: true + zone: + description: zone + type: str + required: false + project_id: + description: project_id + type: str + required: false + name: + description: name + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + upstream_dns_servers: + description: upstream_dns_servers + type: list + elements: str + required: false + ip_id: + description: ip_id + type: str + required: false + bastion_port: + description: bastion_port + type: int + required: false + +EXAMPLES: + - name: Create a gateway + scaleway.scaleway.scaleway_vpcgw_gateway: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + type_: "aaaaaa" + enable_smtp: true + enable_bastion: true + +RETURN: + gateway: + description: The gateway information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + type_: + aaaaaa: bbbbbb + cccccc: dddddd + status: stopped + name: "aaaaaa" + tags: + - aaaaaa + - bbbbbb + ip: + aaaaaa: bbbbbb + cccccc: dddddd + gateway_networks: + - aaaaaa + - bbbbbb + upstream_dns_servers: + - aaaaaa + - bbbbbb + version: "aaaaaa" + can_upgrade_to: "aaaaaa" + bastion_enabled: true + bastion_port: 3 + smtp_enabled: true + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_vpcgw_gateway_network.py b/plugins/modules/scaleway_vpcgw_gateway_network.py index d86130b..9fcd21d 100644 --- a/plugins/modules/scaleway_vpcgw_gateway_network.py +++ b/plugins/modules/scaleway_vpcgw_gateway_network.py @@ -7,95 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpcgw_gateway_network -short_description: Manage Scaleway vpcgw's gateway_network -description: - - This module can be used to manage Scaleway vpcgw's gateway_network. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - gateway_network_id: - description: gateway_network_id - type: str - required: false - gateway_id: - description: gateway_id - type: str - required: true - private_network_id: - description: private_network_id - type: str - required: true - enable_masquerade: - description: enable_masquerade - type: bool - required: true - zone: - description: zone - type: str - required: false - dhcp_id: - description: dhcp_id - type: str - required: false - address: - description: address - type: str - required: false - enable_dhcp: - description: enable_dhcp - type: bool - required: false -""" - -EXAMPLES = r""" -- name: Create a gateway_network - scaleway.scaleway.scaleway_vpcgw_gateway_network: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - gateway_id: "aaaaaa" - private_network_id: "aaaaaa" - enable_masquerade: true -""" - -RETURN = r""" ---- -gateway_network: - description: The gateway_network information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - gateway_id: 00000000-0000-0000-0000-000000000000 - private_network_id: 00000000-0000-0000-0000-000000000000 - mac_address: "aaaaaa" - enable_masquerade: true - status: created - dhcp: - aaaaaa: bbbbbb - cccccc: dddddd - enable_dhcp: true - address: "aaaaaa" - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpcgw_gateway_network.yml b/plugins/modules/scaleway_vpcgw_gateway_network.yml new file mode 100644 index 0000000..63e97e8 --- /dev/null +++ b/plugins/modules/scaleway_vpcgw_gateway_network.yml @@ -0,0 +1,84 @@ +DOCUMENTATION: + module: scaleway_vpcgw_gateway_network + short_description: Manage Scaleway vpcgw's gateway_network + description: + - This module can be used to manage Scaleway vpcgw's gateway_network. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + gateway_network_id: + description: gateway_network_id + type: str + required: false + gateway_id: + description: gateway_id + type: str + required: true + private_network_id: + description: private_network_id + type: str + required: true + enable_masquerade: + description: enable_masquerade + type: bool + required: true + zone: + description: zone + type: str + required: false + dhcp_id: + description: dhcp_id + type: str + required: false + address: + description: address + type: str + required: false + enable_dhcp: + description: enable_dhcp + type: bool + required: false + +EXAMPLES: + - name: Create a gateway_network + scaleway.scaleway.scaleway_vpcgw_gateway_network: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + gateway_id: "aaaaaa" + private_network_id: "aaaaaa" + enable_masquerade: true + +RETURN: + gateway_network: + description: The gateway_network information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + gateway_id: 00000000-0000-0000-0000-000000000000 + private_network_id: 00000000-0000-0000-0000-000000000000 + mac_address: "aaaaaa" + enable_masquerade: true + status: created + dhcp: + aaaaaa: bbbbbb + cccccc: dddddd + enable_dhcp: true + address: "aaaaaa" + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_vpcgw_ip.py b/plugins/modules/scaleway_vpcgw_ip.py index 46ce88f..117834f 100644 --- a/plugins/modules/scaleway_vpcgw_ip.py +++ b/plugins/modules/scaleway_vpcgw_ip.py @@ -7,75 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpcgw_ip -short_description: Manage Scaleway vpcgw's ip -description: - - This module can be used to manage Scaleway vpcgw's ip. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - ip_id: - description: ip_id - type: str - required: false - zone: - description: zone - type: str - required: false - project_id: - description: project_id - type: str - required: false - tags: - description: tags - type: list - elements: str - required: false -""" - -EXAMPLES = r""" -- name: Create a ip - scaleway.scaleway.scaleway_vpcgw_ip: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" -""" - -RETURN = r""" ---- -ip: - description: The ip information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - organization_id: 00000000-0000-0000-0000-000000000000 - project_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - tags: - - aaaaaa - - bbbbbb - address: "aaaaaa" - reverse: "aaaaaa" - gateway_id: 00000000-0000-0000-0000-000000000000 - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpcgw_ip.yml b/plugins/modules/scaleway_vpcgw_ip.yml new file mode 100644 index 0000000..16b6048 --- /dev/null +++ b/plugins/modules/scaleway_vpcgw_ip.yml @@ -0,0 +1,65 @@ +DOCUMENTATION: + module: scaleway_vpcgw_ip + short_description: Manage Scaleway vpcgw's ip + description: + - This module can be used to manage Scaleway vpcgw's ip. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + ip_id: + description: ip_id + type: str + required: false + zone: + description: zone + type: str + required: false + project_id: + description: project_id + type: str + required: false + tags: + description: tags + type: list + elements: str + required: false + +EXAMPLES: + - name: Create a ip + scaleway.scaleway.scaleway_vpcgw_ip: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + + +RETURN: + ip: + description: The ip information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + organization_id: 00000000-0000-0000-0000-000000000000 + project_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + tags: + - aaaaaa + - bbbbbb + address: "aaaaaa" + reverse: "aaaaaa" + gateway_id: 00000000-0000-0000-0000-000000000000 + zone: "aaaaaa" diff --git a/plugins/modules/scaleway_vpcgw_pat_rule.py b/plugins/modules/scaleway_vpcgw_pat_rule.py index 6258f06..9b50aaf 100644 --- a/plugins/modules/scaleway_vpcgw_pat_rule.py +++ b/plugins/modules/scaleway_vpcgw_pat_rule.py @@ -7,93 +7,6 @@ __metaclass__ = type -DOCUMENTATION = r""" ---- -module: scaleway_vpcgw_pat_rule -short_description: Manage Scaleway vpcgw's pat_rule -description: - - This module can be used to manage Scaleway vpcgw's pat_rule. -version_added: "2.1.0" -author: - - Nathanael Demacon (@quantumsheep) -extends_documentation_fragment: - - scaleway.scaleway.scaleway - - scaleway.scaleway.scaleway_waitable_resource -requirements: - - scaleway >= 0.6.0 -options: - state: - description: - - Indicate desired state of the target. - - C(present) will create the resource. - - C(absent) will delete the resource, if it exists. - default: present - choices: ["present", "absent"] - type: str - pat_rule_id: - description: pat_rule_id - type: str - required: false - gateway_id: - description: gateway_id - type: str - required: true - public_port: - description: public_port - type: int - required: true - private_ip: - description: private_ip - type: str - required: true - private_port: - description: private_port - type: int - required: true - protocol: - description: protocol - type: str - required: true - choices: - - unknown - - both - - tcp - - udp - zone: - description: zone - type: str - required: false -""" - -EXAMPLES = r""" -- name: Create a pat_rule - scaleway.scaleway.scaleway_vpcgw_pat_rule: - access_key: "{{ scw_access_key }}" - secret_key: "{{ scw_secret_key }}" - gateway_id: "aaaaaa" - public_port: "aaaaaa" - private_ip: "aaaaaa" - private_port: "aaaaaa" - protocol: "aaaaaa" -""" - -RETURN = r""" ---- -pat_rule: - description: The pat_rule information - returned: when I(state=present) - type: dict - sample: - id: 00000000-0000-0000-0000-000000000000 - gateway_id: 00000000-0000-0000-0000-000000000000 - created_at: "aaaaaa" - updated_at: "aaaaaa" - public_port: 3 - private_ip: "aaaaaa" - private_port: 3 - protocol: both - zone: "aaaaaa" -""" from ansible.module_utils.basic import ( AnsibleModule, diff --git a/plugins/modules/scaleway_vpcgw_pat_rule.yml b/plugins/modules/scaleway_vpcgw_pat_rule.yml new file mode 100644 index 0000000..61a4376 --- /dev/null +++ b/plugins/modules/scaleway_vpcgw_pat_rule.yml @@ -0,0 +1,82 @@ +DOCUMENTATION: + module: scaleway_vpcgw_pat_rule + short_description: Manage Scaleway vpcgw's pat_rule + description: + - This module can be used to manage Scaleway vpcgw's pat_rule. + version_added: "2.1.0" + author: + - Nathanael Demacon (@quantumsheep) + extends_documentation_fragment: + - scaleway.scaleway.scaleway + - scaleway.scaleway.scaleway_waitable_resource + requirements: + - scaleway >= 0.6.0 + options: + state: + description: + - Indicate desired state of the target. + - C(present) will create the resource. + - C(absent) will delete the resource, if it exists. + default: present + choices: ["present", "absent"] + type: str + pat_rule_id: + description: pat_rule_id + type: str + required: false + gateway_id: + description: gateway_id + type: str + required: true + public_port: + description: public_port + type: int + required: true + private_ip: + description: private_ip + type: str + required: true + private_port: + description: private_port + type: int + required: true + protocol: + description: protocol + type: str + required: true + choices: + - unknown + - both + - tcp + - udp + zone: + description: zone + type: str + required: false + +EXAMPLES: + - name: Create a pat_rule + scaleway.scaleway.scaleway_vpcgw_pat_rule: + access_key: "{{ scw_access_key }}" + secret_key: "{{ scw_secret_key }}" + gateway_id: "aaaaaa" + public_port: "aaaaaa" + private_ip: "aaaaaa" + private_port: "aaaaaa" + protocol: "aaaaaa" + +RETURN: + pat_rule: + description: The pat_rule information + returned: when I(state=present) + type: dict + sample: + id: 00000000-0000-0000-0000-000000000000 + gateway_id: 00000000-0000-0000-0000-000000000000 + created_at: "aaaaaa" + updated_at: "aaaaaa" + public_port: 3 + private_ip: "aaaaaa" + private_port: 3 + protocol: both + zone: "aaaaaa"