aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2015-09-07 13:09:56 +0100
committerPaul Bourke <paul.bourke@oracle.com>2015-09-07 12:52:54 +0000
commit34e43bbe8d4d6006645fcdd157b9f2fb7731da4e (patch)
tree363f434da24c36acf57ab076f1eef4bedd63bbdd
parent34cbe82e6efed5222a2ab2b29368505ea8f41f00 (diff)
downloadkolla-34e43bbe8d4d6006645fcdd157b9f2fb7731da4e.tar.gz
kolla-34e43bbe8d4d6006645fcdd157b9f2fb7731da4e.zip
Cleanup small todo in Vagrantfile
Makes provision steps more readable. Co-Authored-By: Martin André <martin.andre@gmail.com> Change-Id: I177c467f01f6122ad8902f2b62694bc3acb7b0c8 Closes-Bug: #1493010
-rw-r--r--vagrant/Vagrantfile20
1 files changed, 13 insertions, 7 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 6cffc58c1..2d471a41c 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -23,13 +23,19 @@ Vagrant.configure(2) do |config|
my_privatekey = File.read(File.join(File.dirname(__FILE__), "vagrantkey"))
my_publickey = File.read(File.join(File.dirname(__FILE__), "vagrantkey.pub"))
- # TODO (harmw): This is slightly difficult to read.
- config.vm.provision :shell, :inline => "mkdir -p /root/.ssh && echo '#{my_privatekey}' > /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa"
- config.vm.provision :shell, :inline => "echo '#{my_publickey}' > /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys"
- config.vm.provision :shell, :inline => "mkdir -p /home/vagrant/.ssh && echo '#{my_privatekey}' >> /home/vagrant/.ssh/id_rsa && chmod 600 /home/vagrant/.ssh/*"
- config.vm.provision :shell, :inline => "echo 'Host *' > ~vagrant/.ssh/config"
- config.vm.provision :shell, :inline => "echo StrictHostKeyChecking no >> ~vagrant/.ssh/config"
- config.vm.provision :shell, :inline => "chown -R vagrant: /home/vagrant/.ssh"
+ config.vm.provision :shell, inline: <<-EOS
+ mkdir -p /root/.ssh
+ echo '#{my_privatekey}' > /root/.ssh/id_rsa
+ chmod 600 /root/.ssh/id_rsa
+ echo '#{my_publickey}' > /root/.ssh/authorized_keys
+ chmod 600 /root/.ssh/authorized_keys
+ mkdir -p /home/vagrant/.ssh
+ echo '#{my_privatekey}' >> /home/vagrant/.ssh/id_rsa
+ chmod 600 /home/vagrant/.ssh/*
+ echo 'Host *' > ~vagrant/.ssh/config
+ echo StrictHostKeyChecking no >> ~vagrant/.ssh/config
+ chown -R vagrant: /home/vagrant/.ssh
+ EOS
config.hostmanager.enabled = true
config.hostmanager.ip_resolver = proc do |vm, resolving_vm|