summaryrefslogtreecommitdiff
path: root/scripts/release-test-os
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/release-test-os')
-rwxr-xr-xscripts/release-test-os7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/release-test-os b/scripts/release-test-os
index 583eb80e..16435371 100755
--- a/scripts/release-test-os
+++ b/scripts/release-test-os
@@ -281,7 +281,12 @@ class Deployment(object):
def _update_known_hosts(self):
if not self._ssh_host_key_exists(self.host_machine.address):
- with open('/root/.ssh/known_hosts', 'a') as known_hosts:
+ filename = '/root/.ssh/known_hosts';
+ print("No known_hosts: ensuring path");
+ if not os.path.exists(os.path.dirname(filename)):
+ os.makedirs(os.path.dirname(filename))
+ with open(filename, 'a') as known_hosts:
+ print("Generating known_hosts");
cliapp.runcmd(['ssh-keyscan', self.host_machine.address],
stdout=known_hosts)