# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  # All Vagrant configuration is done here. The most common configuration
  # options are documented and commented below. For a complete reference,
  # please see the online documentation at vagrantup.com.

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "precise64"

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "512"]
  end

  # The url from where the 'config.vm.box' box will be fetched if it
  # doesn't already exist on the user's system.
  # Ubuntu 12.04
  config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"

  config.vm.provision "shell" do |s|
    s.inline = "sudo apt-get -y install git linux-image-generic-lts-raring linux-headers-generic-lts-raring;curl -L http://www.opscode.com/chef/install.sh > /tmp/install.sh;chmod +x /tmp/install.sh;/tmp/install.sh -v 11.6.0"
  end
  
  config.vm.provision "chef_solo" do |chef|
    
    chef.add_recipe "serviced"
    chef.json = {}

  end

  
end
