diff options
Diffstat (limited to 'cloudinit/config/cc_ssh_import_id.py')
-rw-r--r-- | cloudinit/config/cc_ssh_import_id.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/config/cc_ssh_import_id.py b/cloudinit/config/cc_ssh_import_id.py index f18e1fc5..e733d14a 100644 --- a/cloudinit/config/cc_ssh_import_id.py +++ b/cloudinit/config/cc_ssh_import_id.py @@ -25,19 +25,20 @@ from cloudinit import util distros = ['ubuntu'] -def handle(name, cfg, _cloud, log, args): +def handle(name, cfg, cloud, log, args): if len(args) != 0: user = args[0] ids = [] if len(args) > 1: ids = args[1:] else: + user = None + try: - user = cloud.distro.get_default_username() + user = cloud.distro.get_configured_user() except NotImplementedError: pass - user = None ids = util.get_cfg_option_list(cfg, "ssh_import_id", []) if len(ids) == 0: |