Default ssh keys to empty list

If the node doesn't have ssh keys defined we currently rely on
nodepool adding an empty list of ssh keys. Instead be safe and default
to an empty list.

Change-Id: I1cbac643f47923b18959153f318d3d2fdc9626cd
This commit is contained in:
Tobias Henkel 2019-01-08 15:56:40 +01:00
parent fd53894f73
commit e8dcc42c09
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 1 additions and 1 deletions

View File

@ -1269,7 +1269,7 @@ class AnsibleJob(object):
self.winrm_read_timeout
host_keys = []
for key in node.get('host_keys'):
for key in node.get('host_keys', []):
if port != 22:
host_keys.append("[%s]:%s %s" % (ip, port, key))
else: