Source

chef-eval / Vagrantfile

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

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

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  #config.vm.box = "base"
  # config.vm.box_check_update false
  # config.vm.box_download_checksum true

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  # config.vm.network "private_network", ip: "192.168.33.10"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  #config.vm.synced_folder "./data", "/vagrant_data"

  # CHEF SERVER
  config.vm.define :server do |box_config|
    box_config.vm.box       = 'chef/centos-6.5'
    box_config.vm.host_name = "server.#{DOMAIN}"
    box_config.vm.network :private_network, ip: '172.16.42.10'

    #config.omnibus.chef_version = :latest

    #box_config.vm.provision :puppet do |puppet|
    #  puppet.manifests_path = 'provision/manifests'
    #  puppet.module_path    = 'provision/modules'
    #end
  end

  # CHEF WORKSTATION
  config.vm.define :workstation do |box_config|
    box_config.vm.box       = 'chef/centos-6.5'
    box_config.vm.host_name = "minion1.#{DOMAIN}"
    box_config.vm.network :private_network, ip: '172.16.42.11'

    #config.omnibus.chef_version = :latest

    #box_config.vm.provision :puppet do |puppet|
    #  puppet.manifests_path = 'provision/manifests'
    #  puppet.module_path    = 'provision/modules'
    #end
  end

  # Linux NODE
  config.vm.define :node1 do |box_config|
    box_config.vm.box       = 'chef/centos-6.5'
    box_config.vm.host_name = "node1.#{DOMAIN}"
    box_config.vm.network :private_network, ip: '172.16.42.12'

    #config.omnibus.chef_version = :latest

    #box_config.vm.provision :puppet do |puppet|
    #  puppet.manifests_path = 'provision/manifests'
    #  puppet.module_path    = 'provision/modules'
    #end
  end

  # Windows NODE
  # Configure base box parameters
  # https://github.com/WinRb/vagrant-windows
  config.vm.define :node2 do |box_config|
    box_config.vm.box     = "windows_7_x64"
    box_config.vm.box_url = "~/vagrant-boxes/windows_7_x64.box"

    box_config.vm.host_name = "node2.#{DOMAIN}"
    box_config.vm.network   :private_network, ip: '172.16.42.12'

    box_config.windows.set_work_network = true
    box_config.vm.guest                 = :windows
    box_config.vm.network               :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true

    box_config.vm.provider :virtualbox do |vb|
      vb.gui = true
    end

    # box_config.vm.provision :puppet do |puppet|
    #   puppet.manifests_path = 'provision/manifests'
    #   puppet.module_path    = 'provision/modules'
    # end
  end
end