Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pimvh/ssh_keygen
Ansible role to generate SSH keys
https://github.com/pimvh/ssh_keygen
ansible molecule-tested role ssh-keys sshkeygen
Last synced: about 1 month ago
JSON representation
Ansible role to generate SSH keys
- Host: GitHub
- URL: https://github.com/pimvh/ssh_keygen
- Owner: pimvh
- License: gpl-3.0
- Created: 2023-01-24T18:30:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T18:51:26.000Z (7 months ago)
- Last Synced: 2024-05-20T22:11:09.711Z (7 months ago)
- Topics: ansible, molecule-tested, role, ssh-keys, sshkeygen
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Molecule test](https://github.com/pimvh/ssh_keygen/actions/workflows/test.yaml/badge.svg)
# Requirements1. Ansible installed:
```
sudo apt install python3
python3 -m ensurepip --upgrade
pip3 install ansible
```## Required variables
Review the variables as shown in defaults.
```
ssh_keygen_storagedir: "~/.ssh" # where to save generated key
ssh_keygen_keyname: "ed25519" # filename of key
ssh_keygen_cipher: "ed25519" # passed to -t, values are dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa
ssh_keygen_cipher_options: "" # cipher options addtional args to pass when generating keys
ssh_keygen_comment: "" # Comment to set in the key
ssh_keygen_passphrase: "" # Optionally pass a passphrase to generated key (to not prompt for one)
```# Example playbook
```
hosts:
- foo
roles:
- pimvh.ssh_keygen```
# TLDR - What will happen if I run this
- Generate ssh key
- Add public key as fact# Future Improvements
- Add variable assertions
- Use community library instead for key generation