summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorKim Hagen <kim@sentrium.io>2021-03-29 06:44:35 -0500
committerKim Hagen <kim@sentrium.io>2021-03-29 06:46:01 -0500
commit5b47d9dc1cd80e3dbd0fb21125febab2e99d5f9c (patch)
tree1afd01e2d795c1a2b65f7830d059f3e49861fa30 /cloudinit
parent57e53d13ad772a74f55c38d95f6d61623fe08633 (diff)
downloadvyos-cloud-init-5b47d9dc1cd80e3dbd0fb21125febab2e99d5f9c.tar.gz
vyos-cloud-init-5b47d9dc1cd80e3dbd0fb21125febab2e99d5f9c.zip
Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x update
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_vyos.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index 7fe01595..42b442fc 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -514,7 +514,8 @@ def handle(name, cfg, cloud, log, _args):
# 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']:
+ ds_keys = metadata_ds.get('public-keys')
+ if ds_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', []))