ansible / ansible.builtin / v2.3.3.0-1 / module / digital_ocean_sshkey Create/delete an SSH key in DigitalOcean | "added in version" 1.6 of ansible.builtin" Authors: Michael Gregson (@mgregson) preview | supported by communityansible.builtin.digital_ocean_sshkey (v2.3.3.0-1) — module
pip
Install with pip install ansible==2.3.3.0.post1
Create/delete an SSH key.
# Ensure a SSH key is present # If a key matches this name, will return the ssh key id and changed = False # If no existing key matches this name, a new key is created, the ssh key id is returned and changed = False - digital_ocean_sshkey: state: present name: my_ssh_key ssh_pub_key: 'ssh-rsa AAAA...' client_id: XXX api_key: XXX
id: description: - Numeric, the SSH key id you want to operate on. name: description: - String, this is the name of an SSH key to create or destroy. state: choices: - present - absent default: present description: - Indicate desired state of the target. api_key: description: - DigitalOcean api key. client_id: description: - DigitalOcean manager id. ssh_pub_key: description: - The public SSH key you want to add to your account.