diff options
author | Kim Hagen <kim@sentrium.io> | 2021-06-09 14:43:58 -0500 |
---|---|---|
committer | Kim Hagen <kim@sentrium.io> | 2021-08-02 10:19:08 -0500 |
commit | e979e3d269ce8cbdb3933a141853bb35b9ed7b74 (patch) | |
tree | 84e0bbe7be78efcfd0002e3f64bcc2d98c3737d4 | |
parent | 9dd5fa374ccfd74d46551641fb68428e4860b820 (diff) | |
download | vyos-cloud-init-e979e3d269ce8cbdb3933a141853bb35b9ed7b74.tar.gz vyos-cloud-init-e979e3d269ce8cbdb3933a141853bb35b9ed7b74.zip |
Add descrition for why the the ssh_keys variable is parsed.
-rw-r--r-- | cloudinit/config/cc_vyos.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index a9a71244..16bd2c17 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -494,7 +494,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'] + # If the ssh key is left emty on an OVA deploy the OVF datastore passes an empty string which generates an invalid key error. + # Set the ssh_keys variable from the metadata_v1['public_ssh_keys'] checked for empty strings. + ssh_keys = [key for key in metadata_v1['public_ssh_keys'] if key ] # append SSH keys from cloud-config ssh_keys.extend(cfg.get('ssh_authorized_keys', [])) # Configure authentication for default user account |