summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-08-19 17:40:27 -0700
committerelijah <elijah@riseup.net>2015-08-19 17:40:27 -0700
commite1190e9127ffac98304e7ddb7730b092d2a0a00b (patch)
tree15d71f3d60b85807fc63924bd45acde803f5f293
parent67e1536fa4340fc46c63ffafd2514e97939588c3 (diff)
fix vagrant ssh key path
-rw-r--r--lib/leap_cli/path.rb4
-rw-r--r--lib/leap_cli/remote/tasks.rb3
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/leap_cli/path.rb b/lib/leap_cli/path.rb
index 1f6726a..43bb3e0 100644
--- a/lib/leap_cli/path.rb
+++ b/lib/leap_cli/path.rb
@@ -99,4 +99,8 @@ module LeapCli; module Path
end
end
+ def self.vagrant_ssh_key_file
+ File.join(LEAP_CLI_BASE_DIR, 'vendor', 'vagrant_ssh_keys', 'vagrant.key')
+ end
+
end; end
diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb
index d7a90e7..a2d12b8 100644
--- a/lib/leap_cli/remote/tasks.rb
+++ b/lib/leap_cli/remote/tasks.rb
@@ -25,8 +25,7 @@ end
task :install_insecure_vagrant_key, :max_hosts => MAX_HOSTS do
leap.log :installing, "insecure vagrant key" do
leap.mkdirs '/root/.ssh'
- key_file = File.expand_path('../../../vendor/vagrant_ssh_keys/vagrant.pub', File.dirname(__FILE__))
- upload key_file, '/root/.ssh/authorized_keys2', :mode => '600'
+ upload LeapCli::Path.vagrant_ssh_key_file, '/root/.ssh/authorized_keys2', :mode => '600'
end
end