Add host IP address to host_keys
We need to prefix our node IP address to the host_keys we get from
nodepool. Otherwise, ansible will fail to properly SSH to the node.
Change-Id: I400e2fdde507b742d133dc2b851a5d12686eb551
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 60b30c7..67fc5e6 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -646,10 +646,15 @@
nodepool_az=node.get('az'),
nodepool_provider=node.get('provider'),
nodepool_region=node.get('region'))
+
+ host_keys = []
+ for key in node.get('host_keys'):
+ host_keys.append("%s %s" % (ip, key))
+
hosts.append(dict(
name=node['name'],
host_vars=host_vars,
- host_keys=node.get('host_keys')))
+ host_keys=host_keys))
return hosts
def _blockPluginDirs(self, path):