community.general.scaleway_compute (8.5.0) — module

Scaleway compute management module

Authors: Remy Leone (@remyleone)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This module manages compute instances on Scaleway.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a server
  community.general.scaleway_compute:
    name: foobar
    state: present
    image: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe
    project: 951df375-e094-4d26-97c1-ba548eeb9c42
    region: ams1
    commercial_type: VC1S
    tags:
      - test
      - www
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a server attached to a security group
  community.general.scaleway_compute:
    name: foobar
    state: present
    image: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe
    project: 951df375-e094-4d26-97c1-ba548eeb9c42
    region: ams1
    commercial_type: VC1S
    security_group: 4a31b633-118e-4900-bd52-facf1085fc8d
    tags:
      - test
      - www
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Destroy it right after
  community.general.scaleway_compute:
    name: foobar
    state: absent
    image: 89ee4018-f8c3-4dc4-a6b5-bca14f985ebe
    project: 951df375-e094-4d26-97c1-ba548eeb9c42
    region: ams1
    commercial_type: VC1S

Inputs

    
name:
    description:
    - Name of the instance
    type: str

tags:
    default: []
    description:
    - List of tags to apply to the instance (5 max)
    elements: str
    required: false
    type: list

wait:
    default: false
    description:
    - Wait for the instance to reach its desired state before returning.
    type: bool

image:
    description:
    - Image identifier used to start the instance with
    required: true
    type: str

state:
    choices:
    - present
    - absent
    - running
    - restarted
    - stopped
    default: present
    description:
    - Indicate desired state of the instance.
    type: str

region:
    choices:
    - ams1
    - EMEA-NL-EVS
    - par1
    - EMEA-FR-PAR1
    - par2
    - EMEA-FR-PAR2
    - waw1
    - EMEA-PL-WAW1
    description:
    - Scaleway compute zone
    required: true
    type: str

api_url:
    aliases:
    - base_url
    default: https://api.scaleway.com
    description:
    - Scaleway API URL.
    type: str

project:
    description:
    - Project identifier.
    - Exactly one of O(project) and O(organization) must be specified.
    type: str
    version_added: 4.3.0
    version_added_collection: community.general

api_token:
    aliases:
    - oauth_token
    description:
    - Scaleway OAuth token.
    required: true
    type: str

public_ip:
    default: absent
    description:
    - Manage public IP on a Scaleway server
    - Could be Scaleway IP address UUID
    - V(dynamic) Means that IP is destroyed at the same time the host is destroyed
    - V(absent) Means no public IP at all
    type: str

api_timeout:
    aliases:
    - timeout
    default: 30
    description:
    - HTTP timeout to Scaleway API in seconds.
    type: int

enable_ipv6:
    default: false
    description:
    - Enable public IPv6 connectivity on the instance
    type: bool

organization:
    description:
    - Organization identifier.
    - Exactly one of O(project) and O(organization) must be specified.
    type: str

wait_timeout:
    default: 300
    description:
    - Time to wait for the server to reach the expected state
    required: false
    type: int

security_group:
    description:
    - Security group unique identifier
    - If no value provided, the default security group or current security group will
      be used
    required: false
    type: str

validate_certs:
    default: true
    description:
    - Validate SSL certs of the Scaleway API.
    type: bool

commercial_type:
    description:
    - Commercial name of the compute node
    required: true
    type: str

wait_sleep_time:
    default: 3
    description:
    - Time to wait before every attempt to check the state of the server
    required: false
    type: int

query_parameters:
    default: {}
    description:
    - List of parameters passed to the query string.
    type: dict