2023-11-08 00:50:44 +08:00
# Ansible role for SSH Key Rotation
2017-02-16 04:02:00 +08:00
2023-11-08 00:50:44 +08:00
An Ansible role that rotates SSH keys on remote servers. By default, the role generates an ed25519 key pair. The current date and Ansible group name are used as the name and comment of the key pair
2018-12-05 07:04:43 +08:00
## Example Playbook
2017-02-16 03:41:30 +08:00
2017-02-16 04:02:00 +08:00
```
---
2023-11-07 21:39:17 +08:00
- name: SSH Keys Rotation
hosts: all
remote_user: user
2017-02-16 04:02:00 +08:00
vars:
2023-11-08 00:50:44 +08:00
is_exclusive: yes
2023-11-07 21:39:17 +08:00
ssh_host_user: user
vars_prompt:
- name: passphrase
prompt: "Enter the passphrase"
private: true
- name: confirm_passphrase
prompt: "Confirm the passphrase"
private: true
2017-02-16 04:02:00 +08:00
roles:
2023-11-07 21:39:17 +08:00
- ssh-key-rotation
2017-02-16 04:02:00 +08:00
```
2017-02-16 03:41:30 +08:00
2023-11-08 00:50:44 +08:00
## Credits
2017-02-16 03:41:30 +08:00
2023-11-08 00:50:44 +08:00
This role is forked from [nyambati/ssh-key-rotation ](https://github.com/nyambati/ssh-key-rotation/tree/master ) by Thomas Nyambati.