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

Vagrant::Config.run 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 = "lucid32"

  # Forward a port from the guest to the host, which allows for outside
  # computers to access the VM, whereas host only networking does not.
  config.vm.forward_port 80, 8080

  # Enable provisioning with chef solo, specifying a cookbooks path, roles
  # path, and data_bags path (all relative to this Vagrantfile), and adding
  # some recipes and/or roles.
  #
  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = ".sandbox/cookbooks"
    chef.roles_path = ".sandbox/roles"
    chef.data_bags_path = ".sandbox/data_bags"
    # chef.add_recipe "magento::nginx"
    # chef.add_recipe "magento::mysql"
    chef.add_recipe "magento::sample"
    # chef.add_role "web"

    # You may also specify custom JSON attributes:
    chef.json = { "mysql" => { "bind_address" => "127.0.0.1", "server_root_password" => "toor" }, "magento" => { "url" => "http://localhost:8080/" } }
  end
end
