Last active
December 19, 2015 11:19
-
-
Save rasschaert/5947283 to your computer and use it in GitHub Desktop.
An example Vagrantfile with settings I often use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
############################################################################### | |
# Base box # | |
############################################################################### | |
config.vm.box = "chef/centos-6.5" | |
############################################################################### | |
# Global provisioning settings # | |
############################################################################### | |
config.vm.provision :puppet do |p| | |
p.module_path = "modules" | |
p.manifests_path = "manifests" | |
p.manifest_file = "site.pp" | |
p.hiera_config_path = "hiera.yaml" | |
end | |
############################################################################### | |
# Global VirtualBox settings # | |
############################################################################### | |
config.vm.provider "virtualbox" do |v| | |
v.customize [ | |
"modifyvm", :id, | |
"--memory", "1024", | |
"--cpus", "2", | |
"--groups", "/Vagrant" | |
] | |
end | |
############################################################################### | |
# VM definitions # | |
############################################################################### | |
# Web server | |
config.vm.define :web do |web| | |
web.vm.hostname = "web.vagrant.local" | |
web.vm.network :private_network, ip: "192.168.100.11" | |
web.vm.provider("virtualbox") { |v| v.name = "web" } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment