2013-04-20 20:02:25 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.require_plugin 'vagrant-lxc'
|
2013-05-08 22:48:54 +00:00
|
|
|
Vagrant.require_plugin 'vagrant-cachier'
|
2013-04-20 20:02:25 +00:00
|
|
|
|
2013-05-09 00:08:00 +00:00
|
|
|
ENV['BOX_NAME'] ||= 'quantal64'
|
2013-11-06 03:11:36 +00:00
|
|
|
puts "Running vagrant commands using #{ENV['BOX_NAME']} box"
|
2013-05-09 00:08:00 +00:00
|
|
|
|
2013-04-20 20:02:25 +00:00
|
|
|
Vagrant.configure("2") do |config|
|
2013-05-09 00:08:00 +00:00
|
|
|
config.vm.box = ENV['BOX_NAME']
|
2013-06-27 13:39:14 +00:00
|
|
|
config.vm.hostname = 'lxc-test-box'
|
2013-11-06 03:11:36 +00:00
|
|
|
config.vm.box_url = ENV['BOX_URL']
|
2013-09-28 04:47:34 +00:00
|
|
|
config.vm.network :forwarded_port, guest: 80, host: 8080
|
|
|
|
|
|
|
|
config.cache.auto_detect = true
|
2013-04-20 20:02:25 +00:00
|
|
|
|
2013-04-20 23:02:56 +00:00
|
|
|
config.vm.provision :shell,
|
|
|
|
inline: 'mkdir -p /vagrant/tmp && echo -n "Provisioned" > /vagrant/tmp/provisioning'
|
|
|
|
|
|
|
|
config.vm.provision :shell,
|
2013-11-06 03:11:36 +00:00
|
|
|
inline: 'apt-get install apache2 -y'
|
|
|
|
|
|
|
|
config.vm.provision :shell, privileged: false,
|
|
|
|
inline: "if ! [ -f $HOME/original-box ]; then echo '#{ENV['BOX_NAME']}' > $HOME/original-box; fi"
|
2013-04-20 20:02:25 +00:00
|
|
|
end
|