0
0

Update README.md

This commit is contained in:
opnxng 2023-11-08 01:40:48 +08:00
parent 2d35623055
commit b4ffaa13c2

View File

@ -1,28 +1,30 @@
# Ansible role for SSH Key Rotation # Ansible role for SSH Key Rotation
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 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.
## Example Playbook ## Example Playbook
``` ```
--- ---
- name: SSH Keys Rotation - name: SSH Keys Rotation
hosts: all hosts: all
remote_user: user remote_user: user
vars: vars:
is_exclusive: yes is_exclusive: yes
ssh_host_user: user ssh_host_user: user
vars_prompt: ssh_key_path: ".ssh/{{ group_names[0] }}-{{ansible_date_time.date}}"
- name: passphrase ssh_key_comment: "{{ group_names[0] }}-{{ansible_date_time.date}}"
prompt: "Enter the passphrase" vars_prompt:
private: true - name: passphrase
- name: confirm_passphrase prompt: "Enter the passphrase"
prompt: "Confirm the passphrase" private: true
private: true - name: confirm_passphrase
roles: prompt: "Confirm the passphrase"
- ssh-key-rotation private: true
``` roles:
- ssh-key-rotation
## Credits ```
## Credits
This role is forked from [nyambati/ssh-key-rotation](https://github.com/nyambati/ssh-key-rotation/tree/master) by Thomas Nyambati. This role is forked from [nyambati/ssh-key-rotation](https://github.com/nyambati/ssh-key-rotation/tree/master) by Thomas Nyambati.