hetzner.hcloud.hcloud_ssh_key – Create and manage ssh keys on the Hetzner Cloud.¶
Note
This plugin is part of the hetzner.hcloud collection (version 1.4.2).
To install it use: ansible-galaxy collection install hetzner.hcloud
.
To use it in a playbook, specify: hetzner.hcloud.hcloud_ssh_key
.
Requirements¶
The below requirements are needed on the host that executes this module.
hcloud-python >= 1.0.0
Parameters¶
See Also¶
See also
- Documentation for Hetzner Cloud API
Complete reference for the Hetzner Cloud API.
Examples¶
- name: Create a basic ssh_key
hcloud_ssh_key:
name: my-ssh_key
public_key: "ssh-rsa AAAjjk76kgf...Xt"
state: present
- name: Create a ssh_key with labels
hcloud_ssh_key:
name: my-ssh_key
public_key: "ssh-rsa AAAjjk76kgf...Xt"
labels:
key: value
mylabel: 123
state: present
- name: Ensure the ssh_key is absent (remove if needed)
hcloud_ssh_key:
name: my-ssh_key
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Lukas Kaemmerling (@LKaemmerling)