This repository has been archived by the owner on Feb 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathVagrantfile
63 lines (49 loc) · 2.07 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# -*- 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.require_version ">= 1.5.0"
if `vagrant --version` < 'Vagrant 1.5.0'
abort('Your Vagrant is too old. Please install at least 1.5.0')
end
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.hostname = 'vip.local'
config.vm.network :private_network, ip: "10.86.73.80"
config.ssh.insert_key = false #see https://github.com/Automattic/vip-quickstart/issues/502
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
# Virtualbox overrides
config.vm.provider "virtualbox" do |v|
# Use 1GB of memory
v.memory = 1024
# Use 2 CPUs
v.cpus = 2
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
v.customize ["modifyvm", :id, "--ioapic", "on"]
v.customize ["modifyvm", :id, "--nictype1", "Am79C973"]
end
# VMWare Fusion overrides
config.vm.provider "vmware_fusion" do |v|
# Use 1GB of memory in vmware_fusion
v.memory = 1024
v.vm.box = "precise64-vmware"
v.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
end
config.vm.synced_folder ".", "/srv", owner: 'www-data', group: 'www-data', mount_options: ["dmode=775", "fmode=664"]
# Address a bug in an older version of Puppet
# See http://stackoverflow.com/questions/10894661/augeas-support-on-my-vagrant-machine
config.vm.provision :shell, :inline => "if ! dpkg -s puppet > /dev/null; then sudo apt-get update --quiet --yes && sudo apt-get install puppet --quiet --yes; fi"
# Provision everything we need with Puppet
config.vm.provision :puppet do |puppet|
puppet.module_path = "puppet/modules"
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "init.pp"
puppet.options = ['--templatedir', '/srv/puppet/files']
puppet.facter = {
"quickstart_domain" => 'vip.local',
}
end
end