community.general.scaleway_security_group (8.5.0) — module

Scaleway Security Group management module

Authors: Antoine Barbare (@abarbare)

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a Security Group
  community.general.scaleway_security_group:
    state: present
    region: par1
    name: security_group
    description: "my security group description"
    organization: "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9"
    stateful: false
    inbound_default_policy: accept
    outbound_default_policy: accept
    organization_default: false
  register: security_group_creation_task

Inputs

    
name:
    description:
    - Name of the Security Group.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Indicate desired state of the Security Group.
    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 V(par1)).
    required: true
    type: str

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

stateful:
    description:
    - Create a stateful security group which allows established connections in and out.
    required: true
    type: bool

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

description:
    description:
    - Description of the Security Group.
    type: str

organization:
    description:
    - 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

organization_default:
    description:
    - Create security group to be the default one.
    type: bool

inbound_default_policy:
    choices:
    - accept
    - drop
    description:
    - Default policy for incoming traffic.
    type: str

outbound_default_policy:
    choices:
    - accept
    - drop
    description:
    - Default policy for outcoming traffic.
    type: str

Outputs

data:
  description: This is only present when O(state=present).
  returned: when O(state=present)
  sample:
    scaleway_security_group:
      description: my security group description
      enable_default_security: true
      id: 0168fb1f-cc46-4f69-b4be-c95d2a19bcae
      inbound_default_policy: accept
      name: security_group
      organization: 43a3b6c8-916f-477b-b7ec-ff1898f5fdd9
      organization_default: false
      outbound_default_policy: accept
      servers: []
      stateful: false
  type: dict