summaryrefslogtreecommitdiffstats
path: root/vagrant/Vagrantfile
diff options
context:
space:
mode:
authorDavid Isaac Wolinsky <isaac.wolinsky@gmail.com>2013-12-09 23:13:39 -0500
committerTails developers <amnesia@boum.org>2013-12-21 12:16:25 +0000
commit3d093c8e481a244320a74781ea12e57cedbd9d8c (patch)
treee008f8168e0d58c93d3b07e26964537fb671f1e1 /vagrant/Vagrantfile
parent4d81fa4d9890fd89ebfed9bbd26873ebbd22c17d (diff)
fixes for vagrant v2 (1.3.5) - Version tested via vagrant_version: vagrant_old - Moved the box checksum as a define since the newer vagrant doesn't pass the env to the downloader - Added the insertion of the Debian keys because it was failing to build otherwise
Diffstat (limited to 'vagrant/Vagrantfile')
-rw-r--r--vagrant/Vagrantfile34
1 files changed, 25 insertions, 9 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 999c3b2..3f097e8 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -19,6 +19,7 @@
# Monkey-patched Vagrant!
$:.unshift File.expand_path('../lib', __FILE__)
+require 'vagrant_version'
require 'vagrant_verified_download'
require 'tails_build_settings'
@@ -30,16 +31,31 @@ end
cpus = ENV['TAILS_BUILD_CPUS']
-Vagrant::Config.run do |config|
- config.vm.box = 'tails'
-
- config.vm.box_url = 'http://dl.amnesia.boum.org/tails/project/vagrant/squeeze.box'
- config.vm.box_checksum = '8951d257fc4751437812477df81d55670ebcc0b57c525c248cf2284a89540ca3'
+if vagrant_old
+ Vagrant::Config.run do |config|
+ config.vm.box = 'tails'
+ config.vm.box_url = 'http://dl.amnesia.boum.org/tails/project/vagrant/squeeze.box'
+
+ config.vm.provision :shell, :inline => "http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder"
+
+ config.vm.share_folder 'amnesia', '/amnesia.git', '../.git'
+
+ config.vm.customize ['modifyvm', :id, '--memory', mem_size]
+ config.vm.customize ['modifyvm', :id, '--cpus', cpus] unless cpus.nil?
+ end
+else
+ Vagrant.configure("2") do |config|
+ config.vm.box = 'tails'
+ config.vm.box_url = 'http://dl.amnesia.boum.org/tails/project/vagrant/squeeze.box'
- config.vm.provision :shell, :inline => "http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder"
+ config.vm.provision "shell",
+ inline: "sudo http_proxy='#{ENV['http_proxy']}' /vagrant/provision/setup-tails-builder"
- config.vm.share_folder 'amnesia', '/amnesia.git', '../.git'
+ config.vm.synced_folder '../.git', '/amnesia.git'
- config.vm.customize ['modifyvm', :id, '--memory', mem_size]
- config.vm.customize ['modifyvm', :id, '--cpus', cpus] unless cpus.nil?
+ config.vm.provider :virtualbox do |vb|
+ vb.customize ['modifyvm', :id, '--memory', mem_size]
+ vb.customize ['modifyvm', :id, '--cpus', cpus] unless cpus.nil?
+ end
+ end
end