From bfe7440ffcf36cb8ecfdc8829e7dbee4efc43495 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 8 Mar 2013 01:07:41 -0300 Subject: [PATCH] Update example vagrantfile to use the quantl64 box --- example/Vagrantfile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/example/Vagrantfile b/example/Vagrantfile index 47cf9ab..02c3b91 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -4,26 +4,37 @@ Vagrant.require_plugin 'vagrant-lxc' Vagrant.configure("2") do |config| - config.vm.box = "ubuntu-cloud" - config.vm.hostname = 'ubuntu-cloud-box' - + config.vm.box = "quantal64" + config.vm.box_url = '../boxes/output/lxc-quantal64.box' + config.vm.hostname = 'lxc-quantal64' config.vm.network :private_network, ip: "192.168.33.10" config.vm.synced_folder "/tmp", "/vagrant_data" config.vm.provider :lxc do |lxc| - config.vm.box_url = '../boxes/output/ubuntu-cloud.box' lxc.start_opts << 'lxc.cgroup.memory.limit_in_bytes=400M' lxc.start_opts << 'lxc.cgroup.memory.memsw.limit_in_bytes=500M' end - config.vm.provision :shell, :inline => 'echo "Hi there I\'m a shell script used for provisioning"' + config.vm.provision :shell, :inline => <<-SCRIPT +echo "Hi there I'm a shell script used for provisioning" +if `which puppet > /dev/null`; then + echo "Looks like puppet has already been installed, moving on" + exit 0 +fi +echo "I'm about to install puppet!" +sleep 1 +echo "Hang tight, I just need to wait for a while since vagrant-lxc is not handling network properly ;)" +sleep 5 +sudo apt-get update +sudo apt-get install puppet -y + SCRIPT config.vm.provision :puppet do |puppet| puppet.module_path = "puppet/modules" puppet.manifests_path = "puppet/manifests" puppet.manifest_file = "site.pp" - # If you want to make some noise + # If you want to make some debugging noise # puppet.options << [ '--verbose', '--debug' ] end end