W3cubDocs

/Ansible

community.hrobot.ssh_key_info – Query information on SSH keys

Note

This plugin is part of the community.hrobot collection (version 1.2.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.hrobot.

To use it in a playbook, specify: community.hrobot.ssh_key_info.

New in version 1.2.0: of community.hrobot

Synopsis

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

Parameters

Parameter Choices/Defaults Comments
hetzner_password
string / required
The password for the Robot webservice user.
hetzner_user
string / required
The username for the Robot webservice user.

See Also

See also

community.hrobot.ssh_key

Add, remove or update SSH key

Examples

- name: List all SSH keys
  community.hrobot.ssh_key_info:
    hetzner_user: foo
    hetzner_password: bar
  register: ssh_keys

- name: Show how many keys were found
  ansible.builtin.debug:
    msg: "Found {{ ssh_keys.ssh_keys | length }} keys"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
ssh_keys
list / elements=dictionary
success
The list of all SSH keys stored in Hetzner's Robot for your user.

data
string
success
The key data in OpenSSH's format.

Sample:
ecdsa-sha2-nistp521 AAAAE2VjZHNh ...
fingerprint
string
success
The key's MD5 fingerprint.

Sample:
56:29:99:a4:5d:ed:ac:95:c1:f5:88:82:90:5d:dd:10
name
string
success
The key's name shown in the UI.

Sample:
key1
size
integer
success
The key's size in bits.

Sample:
521
type
string
success
The key's algorithm type.

Sample:
ECDSA


Authors

  • Felix Fontein (@felixfontein)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/hrobot/ssh_key_info_module.html