community.hrobot.ssh_key_info module – Query information on SSH keys
Note
This module is part of the community.hrobot collection (version 1.4.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
Parameters
Parameter |
Comments |
---|---|
The password for the Robot webservice user. |
|
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 |
Description |
---|---|
The list of all SSH keys stored in Hetzner’s Robot for your user. Returned: success |
|
The key data in OpenSSH’s format. Returned: success Sample: “ecdsa-sha2-nistp521 AAAAE2VjZHNh …” |
|
The key’s MD5 fingerprint. Returned: success Sample: “56:29:99:a4:5d:ed:ac:95:c1:f5:88:82:90:5d:dd:10” |
|
The key’s name shown in the UI. Returned: success Sample: “key1” |
|
The key’s size in bits. Returned: success Sample: 521 |
|
The key’s algorithm type. Returned: success Sample: “ECDSA” |
Authors
Felix Fontein (@felixfontein)
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication