serverscom.sc_api.sc_ssh_keys_info (0.1.0) — module

Return all registered ssh public keys.

| "added in version" 1.0.0 of serverscom.sc_api"

Authors: George Shuklin (@amarao)

preview | supported by community

Install collection

Install with ansible-galaxy collection install serverscom.sc_api:==0.1.0


Add to requirements.yml

  collections:
    - name: serverscom.sc_api
      version: 0.1.0

Description

Return list of all registered ssh keys.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Add ssh key
      sc_ssh_keys_info:
      register: keys_list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - debug: var=keys_list.ssh_keys

Inputs

    
token:
    description:
    - Token to use.
    - You can create token for you account in https://portal.servers.com in Profile ->
      Public API section.
    required: true
    type: str

endpoint:
    default: https://api.servers.com/v1
    description:
    - Endpoint to use to connect to API.
    - Do not change until specifically asked to do otherwise.
    type: str

Outputs

api_url:
  description: URL for the failed request
  returned: on failure
  type: str
ssh_keys:
  contains:
    created_at:
      description:
      - Date this key was registered.
      type: str
    fingerprint:
      description:
      - Fingerprint of the public key.
      type: str
    name:
      description:
      - Name of the key
      type: str
    updated_at:
      description:
      - Date this key was updated last time.
      type: str
  description:
  - List of registered ssh public keys
  - Can be empty if no keys were registered.
  returned: on success
  type: complex
status_code:
  description: Status code for the request
  returned: always
  type: int