fix import of ssh keys in answers bw compat support

This commit is contained in:
Michael Hudson-Doyle 2018-12-18 13:55:30 +13:00
parent c73d370a4f
commit dfe61a0f6e
2 changed files with 6 additions and 2 deletions

View File

@ -52,7 +52,11 @@ Identity:
# ubuntu
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
SSH:
install_server: false
install_server: true
pwauth: false
authorized_keys:
- |
ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAA # ssh-import-id lp:subiquity
SnapList:
snaps:
hello:

View File

@ -101,7 +101,7 @@ class SSHController(BaseController):
return
user_spec, ssh_import_id, key_material, fingerprints = result
if 'ssh-import-id' in self.all_answers.get("Identity", {}):
user_spec['ssh_keys'] = key_material.splitlines()
user_spec['authorized_keys'] = key_material.splitlines()
self.loop.set_alarm_in(0.0,
lambda loop, ud: self.done(user_spec))
else: