ssh_public_key_contents should not assume key type rsa
Closed this issue · 0 comments
andylytical commented
add_client creates a root ssh_authorized_key and hardcodes the type as 'rsa'.
Better would be to read the type directly from the key provided. An example is:
YAML:
---
gpfs::add_client::ssh_public_key_contents: >-
ecdsa-sha2-nistp521
key_content
root@gpfs_master
MODULE:
$pubkey_parts = split( $ssh_public_key_contents, ' ' )
ssh_authorized_key { $pubkey_parts[2] :
ensure => present,
user => 'root',
type => $pubkey_parts[0],
key => $pubkey_parts[1],
}