mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-03-26 21:33:25 +00:00
Ensure consistent SSH key format with idempotent Ed25519 key regeneration (#932)
* Ensure consistent SSH key format with idempotent Ed25519 key regeneration * Update plugins/modules/openssh_keypair.py Co-authored-by: Felix Fontein <felix@fontein.de> * removed extra whitespace --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -159,6 +159,13 @@ EXAMPLES = r"""
|
||||
path: /tmp/id_ssh_rsa
|
||||
force: true
|
||||
|
||||
- name: Regenerate SSH keypair only if format or options mismatch
|
||||
community.crypto.openssh_keypair:
|
||||
path: /home/devops/.ssh/id_ed25519
|
||||
type: ed25519
|
||||
regenerate: full_idempotence
|
||||
private_key_format: ssh
|
||||
|
||||
- name: Generate an OpenSSH keypair with a different algorithm (dsa)
|
||||
community.crypto.openssh_keypair:
|
||||
path: /tmp/id_ssh_dsa
|
||||
|
||||
Reference in New Issue
Block a user