[ci skip] Ensure the /root/.ssh directory exists before copying the user's public key into the vm

This commit is contained in:
Jose Diaz-Gonzalez
2015-03-25 02:51:51 -04:00
parent 45e53d3d9d
commit 9dfa7ccee6

2
Vagrantfile vendored
View File

@@ -52,6 +52,6 @@ Vagrant::configure("2") do |config|
if Pathname.new(PUBLIC_KEY_PATH).exist?
config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub'
config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
end
end