From edb745f4348c2867d3e0b477796723409ca0aaa5 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 31 Jul 2019 00:22:59 +0100 Subject: [PATCH] issue #543: create ~/.ssh if it doesn't exist --- .ci/localhost_ansible_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.ci/localhost_ansible_tests.py b/.ci/localhost_ansible_tests.py index 662c7c73..11b1faa1 100755 --- a/.ci/localhost_ansible_tests.py +++ b/.ci/localhost_ansible_tests.py @@ -31,6 +31,10 @@ with ci_lib.Fold('job_setup'): with ci_lib.Fold('machine_prep'): + ssh_dir = os.path.expanduser('~/.ssh') + if not os.path.exists(ssh_dir): + os.makedirs(ssh_dir, int('0700', 8)) + key_path = os.path.expanduser('~/.ssh/id_rsa') shutil.copy(KEY_PATH, key_path)