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:
Aditya Putta
2025-07-11 00:22:47 -05:00
committed by GitHub
parent 2f7a77c84d
commit b2ab04861e

View File

@@ -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