equinix.metal.sshkey_info (1.4.1) — module

Gather information about Equinix Metal SSH keys

| "added in version" 1.3.0 of equinix.metal"

Authors: Tomas Karasek (@t0mk) <tom.to.the.k@gmail.com>, Jason DeTiberus (@detiber) <jdetiberus@equinix.com>

Install collection

Install with ansible-galaxy collection install equinix.metal:==1.4.1


Add to requirements.yml

  collections:
    - name: equinix.metal
      version: 1.4.1

Description

Gather information about Equinix Metal SSH keys.

API is documented at U(https://metal.equinix.com/developers/api/sshkeys/).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# All the examples assume that you have your Equinix Metal API token in env var METAL_API_TOKEN.
# You can also pass the api token in module param api_token.

- name: Gather information about all ssh keys
  hosts: localhost
  tasks:
    - equinix.metal.sshkey_info:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Gather information about a particular ssh key using ID
  hosts: localhost
  tasks:
    - equinix.metal.sshkey_info:
      ids:
        - 173d7f11-f7b9-433e-ac40-f1571a38037a

Inputs

    
ids:
    description:
    - One or more ssh key ids.
    elements: str
    type: list

labels:
    aliases:
    - names
    description:
    - One or more ssh key labels.
    elements: str
    type: list

api_token:
    aliases:
    - auth_token
    description:
    - The Equinix Metal API token to use
    - If not set, then the value of the METAL_API_TOKEN, PACKET_API_TOKEN, or PACKET_TOKEN
      environment variable is used.
    required: true
    type: str

fingerprints:
    description:
    - One ore more ssh key fingerprints.
    elements: str
    type: list

Outputs

sshkeys:
  description: Information about each ssh key that was found.
  returned: always
  sample:
  - fingerprint: 5c:93:74:7c:ed:07:17:62:28:75:79:23:d6:08:93:46
    id: 41d61bd8-3342-428b-a09c-e67bdd18a9b7
    key: ssh-dss AAAAB3NzaC1kc3MAAACBAIfNT5S0ncP4BBJBYNhNPxFF9lqVhfPeu6SM1LoCocxqDc1AT3zFRi8hjIf6TLZ2AA4FYbcAWxLMhiBxZRVldT9GdBXile78kAK5z3bKTwq152DCqpxwwbaTIggLFhsU8wrfBsPWnDuAxZ0h7mmrCjoLIE3CNLDA/NmV3iB8xMThAAAAFQCStcesSgR1adPORzBxTr7hug92LwAAAIBOProm3Gk+HWedLyE8IfofLaOeRnbBRHAOL4z0SexKkVOnQ/LGN/uDIIPGGBDYTvXgKZT+jbHeulRJ2jKgfSpGKN4JxFQ8uzVH492jEiiUJtT72Ss1dCV4PmyERVIw+f54itihV3z/t25dWgowhb0int8iC/OY3cGodlmYb3wdcQAAAIBuLbB45djZXzUkOTzzcRDIRfhaxo5WipbtEM2B1fuBt2gyrvksPpH/LK6xTjdIIb0CxPu4OCxwJG0aOz5kJoRnOWIXQGhH7VowrJhsqhIc8gN9ErbO5ea8b1L76MNcAotmBDeTUiPw01IJ8MdDxfmcsCslJKgoRKSmQpCwXQtN2g==
      tomk@hp2
    label: mynewkey33
  type: list