community.general.scaleway_sshkey (8.5.0) — module

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Add SSH key"
  community.general.scaleway_sshkey:
    ssh_pub_key: "ssh-rsa AAAA..."
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Delete SSH key"
  community.general.scaleway_sshkey:
    ssh_pub_key: "ssh-rsa AAAA..."
    state: "absent"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Add SSH key with explicit token"
  community.general.scaleway_sshkey:
    ssh_pub_key: "ssh-rsa AAAA..."
    state: "present"
    oauth_token: "6ecd2c9b-6f4f-44d4-a187-61a92078d08c"

Inputs

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

api_url:
    aliases:
    - base_url
    default: https://account.scaleway.com
    description:
    - Scaleway API URL.
    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

ssh_pub_key:
    description:
    - The public SSH key as a string to add.
    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:
    ssh_public_keys:
    - key: ssh-rsa AAAA....
  type: dict