vagrant-lxc-ng/spec/Vagrantfile

27 lines
801 B
Text
Raw Normal View History

2013-04-20 20:02:25 +00:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_plugin 'vagrant-lxc'
Vagrant.require_plugin 'vagrant-cachier'
2013-04-20 20:02:25 +00:00
ENV['BOX_NAME'] ||= 'quantal64'
puts "Running vagrant commands using #{ENV['BOX_NAME']} box"
2013-04-20 20:02:25 +00:00
Vagrant.configure("2") do |config|
config.vm.box = ENV['BOX_NAME']
config.vm.hostname = 'lxc-test-box'
config.vm.box_url = ENV['BOX_URL']
config.vm.network :forwarded_port, guest: 80, host: 8080
config.cache.auto_detect = true
2013-04-20 20:02:25 +00:00
config.vm.provision :shell,
inline: 'mkdir -p /vagrant/tmp && echo -n "Provisioned" > /vagrant/tmp/provisioning'
config.vm.provision :shell,
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