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>
This commit is contained in:
parent
b84ad2278c
commit
fb150d95ae
|
@ -646,10 +646,15 @@ class AnsibleJob(object):
|
||||||
nodepool_az=node.get('az'),
|
nodepool_az=node.get('az'),
|
||||||
nodepool_provider=node.get('provider'),
|
nodepool_provider=node.get('provider'),
|
||||||
nodepool_region=node.get('region'))
|
nodepool_region=node.get('region'))
|
||||||
|
|
||||||
|
host_keys = []
|
||||||
|
for key in node.get('host_keys'):
|
||||||
|
host_keys.append("%s %s" % (ip, key))
|
||||||
|
|
||||||
hosts.append(dict(
|
hosts.append(dict(
|
||||||
name=node['name'],
|
name=node['name'],
|
||||||
host_vars=host_vars,
|
host_vars=host_vars,
|
||||||
host_keys=node.get('host_keys')))
|
host_keys=host_keys))
|
||||||
return hosts
|
return hosts
|
||||||
|
|
||||||
def _blockPluginDirs(self, path):
|
def _blockPluginDirs(self, path):
|
||||||
|
|
Loading…
Reference in New Issue