From e979e3d269ce8cbdb3933a141853bb35b9ed7b74 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 9 Jun 2021 14:43:58 -0500 Subject: Add descrition for why the the ssh_keys variable is parsed. --- cloudinit/config/cc_vyos.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cloudinit') 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 -- cgit v1.2.3