{"id":21400254,"url":"https://github.com/oefenweb/ansible-ssh-keys","last_synced_at":"2025-07-13T21:31:07.949Z","repository":{"id":33833390,"uuid":"37533162","full_name":"Oefenweb/ansible-ssh-keys","owner":"Oefenweb","description":"Ansible role to manage ssh keys in Debian-like systems","archived":false,"fork":false,"pushed_at":"2023-11-02T12:16:40.000Z","size":167,"stargazers_count":28,"open_issues_count":0,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-11-02T13:27:22.967Z","etag":null,"topics":["ansible","debian","public-private-key","ssh-client","ssh-key","ssh-server","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-06-16T13:52:10.000Z","updated_at":"2023-11-02T13:27:27.097Z","dependencies_parsed_at":"2023-11-02T13:27:22.862Z","dependency_job_id":null,"html_url":"https://github.com/Oefenweb/ansible-ssh-keys","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-ssh-keys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-ssh-keys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-ssh-keys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-ssh-keys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-ssh-keys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225917646,"owners_count":17544930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","debian","public-private-key","ssh-client","ssh-key","ssh-server","ubuntu"],"created_at":"2024-11-22T15:20:14.136Z","updated_at":"2024-11-22T15:20:14.610Z","avatar_url":"https://github.com/Oefenweb.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ssh-keys\n\n[![CI](https://github.com/Oefenweb/ansible-ssh-keys/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-ssh-keys/actions?query=workflow%3ACI)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-ssh--keys-blue.svg)](https://galaxy.ansible.com/Oefenweb/ssh_keys)\n\nManage ssh public key authentication (public / private / authorized keys and known hosts) in Debian-like systems.\n\n#### Requirements\n\nNone\n\n#### Variables\n\n* `ssh_keys_generate_keys`: [default: `[]`]: Keys to generate locally\n* `ssh_keys_generate_keys.{n}.path`: [required] The local path where the key should be generated\n* `ssh_keys_generate_keys.{n}.cipher`: [default: `None`]: The cipher to encrypt the private key\n* `ssh_keys_generate_keys.{n}.format`: [default: `OpenSSH`]: The format of the public key\n* `ssh_keys_generate_keys.{n}.force`: [default: `false`]: Whether to regenerate the key pair if it already exists\n* `ssh_keys_generate_keys.{n}.owner`: [required]: The name of the user that should own the key pair\n* `ssh_keys_generate_keys.{n}.group`: [default: `owner`]: The name of the group that should own the key pair\n* `ssh_keys_generate_keys.{n}.mode`: [default: `0600`]: The UNIX permission mode bits of the key pair\n* `ssh_keys_generate_keys.{n}.passphrase`: [default: `''`]: The passphrase for the private key\n* `ssh_keys_generate_keys.{n}.size`: [default: `4096`]: Size in bits of the TLS/SSL key to generate\n* `ssh_keys_generate_keys.{n}.type`: [default: `RSA`]: The algorithm used to generate the private key\n\n* `ssh_keys_generate_keys_command`: [optional, default: `_ssh_keys_generate_keys_command`]:\n* `ssh_keys_generate_keys_become`: [optional, default: `false`]: Whether or not to use `sudo` when generating ssh keys (locally)\n\n* `ssh_keys_private_keys`: [default: `[]`]: Private key declarations\n* `ssh_keys_private_keys.{n}.owner`: [required]: The name of the user that should own the file\n* `ssh_keys_private_keys.{n}.group`: [default: `owner`]: The name of the group that should own the file\n* `ssh_keys_private_keys.{n}.mode`: [default: `0600`]: The UNIX permission mode bits of the file\n* `ssh_keys_private_keys.{n}.src`: [required]: The local path of the key\n* `ssh_keys_private_keys.{n}.dest`: [default: `src | basename`]: The remote path of the key (relative to `home/.ssh/`)\n* `ssh_keys_private_keys.{n}.dest_absolute`: [optional]: The remote path of the key\n* `ssh_keys_private_keys.{n}.dest_managed`: [default: `true`]: Whether or not the remote path of the key should be created\n* `ssh_keys_private_keys.{n}.state`: [default: `present`]: State\n\n* `ssh_keys_public_keys`: [default: `[]`]: Public key declarations\n* `ssh_keys_public_keys.{n}.owner`: [required]: The name of the user that should own the file\n* `ssh_keys_public_keys.{n}.group`: [default: `owner`]: The name of the group that should own the file\n* `ssh_keys_public_keys.{n}.mode`: [default: `0644`]: The UNIX permission mode bits of the file\n* `ssh_keys_public_keys.{n}.src`: [required]: The local path of the key\n* `ssh_keys_public_keys.{n}.dest`: [default: `src | basename`]: The remote path of the key (relative to `home/.ssh/`)\n* `ssh_keys_public_keys.{n}.dest_absolute`: [optional]: The remote path of the key\n* `ssh_keys_public_keys.{n}.dest_managed`: [default: `true`]: Whether or not the remote path of the key should be created\n* `ssh_keys_public_keys.{n}.state`: [default: `present`]: State\n\n* `ssh_keys_authorized_keys`: [default: `[]`]: Authorized key declarations\n* `ssh_keys_authorized_keys.{n}.owner`: [required]: The name of the user that should own the file\n* `ssh_keys_authorized_keys.{n}.src`: [required]: The local path of the key\n* `ssh_keys_authorized_keys.{n}.state`: [optional, default: `present`]: State\n* `ssh_keys_authorized_keys.{n}.path`: [optional, default: `authorized_keys`]: Authorized keys file (absolute path, default to `~/.ssh/authorized_keys`)\n\n* `ssh_keys_known_hosts`: [default: `[]`]: Known hosts declarations\n* `ssh_keys_known_hosts.{n}.hostname`: [required]: The hostname\n* `ssh_keys_known_hosts.{n}.enctype`: [required]: The type of the fingerprint\n* `ssh_keys_known_hosts.{n}.fingerprint`: [required]: The actual fingerprint\n\n## Dependencies\n\nNone\n\n#### Example\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.ssh-keys\n  vars:\n    ssh_keys_generate_keys:\n      - path: ../../../files/ssh-keys/id_rsa\n        comment: RSA key\n    ssh_keys_private_keys:\n      - owner: root\n        src: \"{{ playbook_dir }}/files/ssh-keys/id_rsa\"\n    ssh_keys_public_keys:\n      - owner: root\n        src: \"{{ playbook_dir }}/files/ssh-keys/id_rsa.pub\"\n    ssh_keys_authorized_keys:\n      - owner: root\n        src: \"{{ playbook_dir }}/files/ssh-keys/id_rsa.pub\"\n    ssh_keys_known_hosts:\n      - hostname: github.com\n        enctype: ssh-rsa\n        fingerprint: 'AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\n* Mark van Driel\n* Mischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-ssh-keys/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-ssh-keys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-ssh-keys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-ssh-keys/lists"}