The Ansible module vyos.vyos.vyos_user constrains public_keys[].type to a fixed list of key types, and VyOS enforces its own list on the same node. The two are out of sync: T4750 added sk-ecdsa-sha2-nistp256@openssh.com and sk-ssh-ed25519@openssh.com in November 2022, and the module's list was never updated.
Failing task:
- vyos.vyos.vyos_user:
name: vyos
public_keys:
- name: user@host
key: AAAAInNr...
type: sk-ecdsa-sha2-nistp256@openssh.comError:
value of type must be one of: ssh-dss, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ssh-ed25519, ecdsa-sha2-nistp521, got: sk-ecdsa-sha2-nistp256@openssh.com found in public_keys
The equivalent set lines commit without complaint:
set system login user vyos authentication public-keys user@host key 'AAAAInNr...' set system login user vyos authentication public-keys user@host type 'sk-ecdsa-sha2-nistp256@openssh.com'
VyOS's list, from vyos-1x, interface-definitions/system_login.xml.in:
(ssh-dss|ssh-rsa|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521|ssh-ed25519|sk-ecdsa-sha2-nistp256@openssh.com|sk-ssh-ed25519@openssh.com)
The list appears twice in plugins/modules/vyos_user.py, so a fix touches both: the type entry in public_key_spec, and the matching choices list in the DOCUMENTATION block.