community.general.scaleway_ip (8.5.0) — module

Scaleway IP 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 IP on Scaleway account U(https://developer.scaleway.com)

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create an IP
  community.general.scaleway_ip:
    organization: '{{ scw_org }}'
    state: present
    region: par1
  register: ip_creation_task
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Make sure IP deleted
  community.general.scaleway_ip:
    id: '{{ ip_creation_task.scaleway_ip.id }}'
    state: absent
    region: par1

Inputs

    
id:
    description:
    - id of the Scaleway IP (UUID)
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Indicate desired state of the IP.
    type: str

region:
    choices:
    - ams1
    - EMEA-NL-EVS
    - par1
    - EMEA-FR-PAR1
    - par2
    - EMEA-FR-PAR2
    - waw1
    - EMEA-PL-WAW1
    description:
    - Scaleway region to use (for example par1).
    required: true
    type: str

server:
    description:
    - id of the server you want to attach an IP to.
    - To unattach an IP don't specify this option
    type: str

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

reverse:
    description:
    - Reverse to assign to the IP
    type: str

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

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

organization:
    description:
    - Scaleway organization identifier
    required: true
    type: str

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

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

Outputs

data:
  description: This is only present when O(state=present).
  returned: when O(state=present)
  sample:
    ips:
    - address: 212.47.232.136
      id: dd9e8df6-6775-4863-b517-e0b0ee3d7477
      organization: 951df375-e094-4d26-97c1-ba548eeb9c42
      reverse: null
      server:
        id: 3f1568ca-b1a2-4e98-b6f7-31a0588157f1
        name: ansible_tuto-1
  type: dict