community.general.scaleway_container_namespace (8.5.0) — module

Scaleway Container namespace management

| "added in version" 6.0.0 of community.general"

Authors: Guillaume MARTINEZ (@Lunik)

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 container namespaces on Scaleway account.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a container namespace
  community.general.scaleway_container_namespace:
    project_id: '{{ scw_project }}'
    state: present
    region: fr-par
    name: my-awesome-container-namespace
    environment_variables:
      MY_VAR: my_value
    secret_environment_variables:
      MY_SECRET_VAR: my_secret_value
  register: container_namespace_creation_task
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Make sure container namespace is deleted
  community.general.scaleway_container_namespace:
    project_id: '{{ scw_project }}'
    state: absent
    region: fr-par
    name: my-awesome-container-namespace

Inputs

    
name:
    description:
    - Name of the container namespace.
    required: true
    type: str

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

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

region:
    choices:
    - fr-par
    - nl-ams
    - pl-waw
    description:
    - Scaleway region to use (for example V(fr-par)).
    required: true
    type: str

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

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

project_id:
    description:
    - Project identifier.
    required: true
    type: str

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

description:
    default: ''
    description:
    - Description of the container namespace.
    type: str

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

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

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

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

environment_variables:
    default: {}
    description:
    - Environment variables of the container namespace.
    - Injected in containers at runtime.
    type: dict

secret_environment_variables:
    default: {}
    description:
    - Secret environment variables of the container namespace.
    - Updating those values will not output a C(changed) state in Ansible.
    - Injected in containers at runtime.
    type: dict

Outputs

container_namespace:
  description: The container namespace information.
  returned: when O(state=present)
  sample:
    description: ''
    environment_variables:
      MY_VAR: my_value
    error_message: null
    id: 531a1fd7-98d2-4a74-ad77-d398324304b8
    name: my-awesome-container-namespace
    organization_id: e04e3bdc-015c-4514-afde-9389e9be24b0
    project_id: d44cea58-dcb7-4c95-bff1-1105acb60a98
    region: fr-par
    registry_endpoint: ''
    registry_namespace_id: ''
    secret_environment_variables:
    - key: MY_SECRET_VAR
      value: $argon2id$v=19$m=65536,t=1,p=2$tb6UwSPWx/rH5Vyxt9Ujfw$5ZlvaIjWwNDPxD9Rdght3NarJz4IETKjpvAU3mMSmFg
    status: pending
  type: dict