summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_vyos.py
diff options
context:
space:
mode:
authorKim Hagen <kim@sentrium.io>2021-06-09 14:43:58 -0500
committerKim Hagen <kim@sentrium.io>2021-06-09 14:43:58 -0500
commitb1433de9e22fbc3ca5bb83276f4d69f26696a292 (patch)
treecbc96bcabcd12aface18f2b2a02642cc84b76389 /cloudinit/config/cc_vyos.py
parent9f5a20ff749918694cae74d95eb8ea1142f540bb (diff)
downloadvyos-cloud-init-b1433de9e22fbc3ca5bb83276f4d69f26696a292.tar.gz
vyos-cloud-init-b1433de9e22fbc3ca5bb83276f4d69f26696a292.zip
Add descrition for why the the ssh_keys variable is parsed.
Diffstat (limited to 'cloudinit/config/cc_vyos.py')
-rw-r--r--cloudinit/config/cc_vyos.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index e1516f1b..65037e3b 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -514,6 +514,8 @@ 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)
+ # 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', []))