community.hrobot.ssh_key_info (1.9.1) — module

Query information on SSH keys

| "added in version" 1.2.0 of community.hrobot"

Authors: Felix Fontein (@felixfontein)

Install collection

Install with ansible-galaxy collection install community.hrobot:==1.9.1


Add to requirements.yml

  collections:
    - name: community.hrobot
      version: 1.9.1

Description

List information on all your SSH keys stored in Hetzner's Robot.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all SSH keys
  community.hrobot.ssh_key_info:
    hetzner_user: foo
    hetzner_password: bar
  register: ssh_keys
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show how many keys were found
  ansible.builtin.debug:
    msg: "Found {{ ssh_keys.ssh_keys | length }} keys"

Inputs

    
hetzner_user:
    description: The username for the Robot webservice user.
    required: true
    type: str

hetzner_password:
    description: The password for the Robot webservice user.
    required: true
    type: str

Outputs

ssh_keys:
  contains:
    data:
      description:
      - The key data in OpenSSH's format.
      sample: ecdsa-sha2-nistp521 AAAAE2VjZHNh ...
      type: str
    fingerprint:
      description:
      - The key's MD5 fingerprint.
      sample: 56:29:99:a4:5d:ed:ac:95:c1:f5:88:82:90:5d:dd:10
      type: str
    name:
      description:
      - The key's name shown in the UI.
      sample: key1
      type: str
    size:
      description:
      - The key's size in bits.
      sample: 521
      type: int
    type:
      description:
      - The key's algorithm type.
      sample: ECDSA
      type: str
  description:
  - The list of all SSH keys stored in Hetzner's Robot for your user.
  elements: dict
  returned: success
  type: list

See also