From b4ffaa13c227a7314f9e821dfe54dd6cf27644de Mon Sep 17 00:00:00 2001 From: opnxng Date: Wed, 8 Nov 2023 01:40:48 +0800 Subject: [PATCH] Update README.md --- README.md | 56 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index d24e584..9a4bab7 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,30 @@ -# 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 - -## Example Playbook - -``` ---- -- name: SSH Keys Rotation - hosts: all - remote_user: user - vars: - is_exclusive: yes - ssh_host_user: user - vars_prompt: - - name: passphrase - prompt: "Enter the passphrase" - private: true - - name: confirm_passphrase - prompt: "Confirm the passphrase" - private: true - roles: - - ssh-key-rotation -``` - -## Credits - +# 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. + +## Example Playbook + +``` +--- +- name: SSH Keys Rotation + hosts: all + remote_user: user + vars: + is_exclusive: yes + ssh_host_user: user + ssh_key_path: ".ssh/{{ group_names[0] }}-{{ansible_date_time.date}}" + ssh_key_comment: "{{ group_names[0] }}-{{ansible_date_time.date}}" + vars_prompt: + - name: passphrase + prompt: "Enter the passphrase" + private: true + - name: confirm_passphrase + prompt: "Confirm the passphrase" + private: true + roles: + - ssh-key-rotation +``` + +## Credits + This role is forked from [nyambati/ssh-key-rotation](https://github.com/nyambati/ssh-key-rotation/tree/master) by Thomas Nyambati. \ No newline at end of file