Created
June 1, 2015 07:39
-
-
Save hugovk/bf1688ceb63c1d6ab1d1 to your computer and use it in GitHub Desktop.
A Drupal Vagrantfile
This file contains 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 : | |
hostname = 'myvagrant' | |
domain = 'example.com' | |
ip = '192.168.54.5' | |
#forwarded_port = 8080 | |
cpus = 2 | |
ram = 2048 | |
Vagrant.configure("2") do |config| | |
# Provider: VirtualBox (default) | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
# Provider: VMWare Workstation | |
config.vm.provider :vmware_workstation do |v,o| | |
o.vm.box = "precise64_vmware" | |
o.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box" | |
v.vmx["memsize"] = ram | |
v.vmx["numvcpus"] = cpus | |
end | |
config.vm.provider "virtualbox" do |v,o| | |
v.customize [ | |
'modifyvm', :id, | |
'--name', hostname, | |
'--cpus', cpus, | |
'--memory', ram | |
] | |
end | |
# Common settings | |
config.vm.host_name = (domain) ? hostname + '.' + domain : hostname | |
# config.vm.network "forwarded_port", guest: 80, host: forwarded_port | |
config.ssh.forward_agent = true | |
if ip | |
if ip == 'dhcp' | |
config.vm.network :private_network, type: :dhcp | |
else | |
config.vm.network :private_network, ip: ip | |
end | |
else | |
config.vm.network :public_network | |
end | |
# Puppet provision | |
config.vm.provision :puppet do |puppet| | |
puppet.manifests_path = 'puppet/manifests' | |
puppet.manifest_file = 'site.pp' | |
puppet.module_path = 'puppet/modules' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also needs a load of files in a
puppet
directory, ask me for them.