From eef431a4fbe4b2b7227e4ef2764c853f10d0d209 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Thu, 25 Mar 2021 09:54:15 -0500 Subject: Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x --- cloudinit/config/cc_vyos.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index e472a1cd..445af475 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -495,6 +495,9 @@ def handle(name, cfg, cloud, log, _args): # configure system logins # Prepare SSH public keys for default user, to be sure that global keys applied to the default account (if it exist) ssh_keys = metadata_v1['public_ssh_keys'] + # append SSH keys from metadata_ds + if metadata_ds['public-keys']: + ssh_keys.extend([ key for key in metadata_ds['public-keys'] ]) # append SSH keys from cloud-config ssh_keys.extend(cfg.get('ssh_authorized_keys', [])) # Configure authentication for default user account -- cgit v1.2.3