summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorKim Hagen <kim@sentrium.io>2021-03-25 09:54:15 -0500
committerKim Hagen <kim@sentrium.io>2021-03-25 09:54:15 -0500
commit57e53d13ad772a74f55c38d95f6d61623fe08633 (patch)
tree73a5c4e176c553356709afeef60478aa8a4fc128 /cloudinit
parent393cc322629604843b98da970b0761965a7a268e (diff)
downloadvyos-cloud-init-57e53d13ad772a74f55c38d95f6d61623fe08633.tar.gz
vyos-cloud-init-57e53d13ad772a74f55c38d95f6d61623fe08633.zip
Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_vyos.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index 45b1ca07..7fe01595 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -513,6 +513,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