diff options
author | Kim <kim.sidney@gmail.com> | 2021-03-29 04:47:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 04:47:40 -0700 |
commit | b585a61d350e97651f94a72499b638e23657c34c (patch) | |
tree | af752cec02925d92b5a35dd39f7f7c33c2108677 | |
parent | d253a12a73f482dacd471d616ee31f550cefee8a (diff) | |
parent | 8d23e422288c18612d7149293c165c75a40b72df (diff) | |
download | vyos-cloud-init-b585a61d350e97651f94a72499b638e23657c34c.tar.gz vyos-cloud-init-b585a61d350e97651f94a72499b638e23657c34c.zip |
Merge pull request #36 from UnicronNL/crux
Metadata: T3432: Azure ssh keys not working for version 1.2.7/1.3.x u…
-rw-r--r-- | cloudinit/config/cc_vyos.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index 445af475..f9384e8b 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -496,7 +496,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', [])) |