forked from acorncom/base-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
67 lines (51 loc) · 2 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
64
65
66
67
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Some info on how to adjust this file: http://garylarizza.com/blog/2013/02/01/repeatable-puppet-development-with-vagrant/
hostname = "www.box.dev"
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
# VMWare Fusion customization
config.vm.provider :vmware_fusion do |vmware, override|
# Customize VM
vmware.vmx["memsize"] = "1024"
vmware.vmx["numvcpus"] = "1"
end
# Virtualbox customization
config.vm.provider :virtualbox do |virtualbox, override|
# Customize VM
virtualbox.customize ["modifyvm", :id, "--memory", "1024", "--cpus", "1", "--pae", "on", "--hwvirtex", "on", "--ioapic", "on"]
end
# Network
config.vm.network :private_network, ip: "192.168.200.20"
config.vm.hostname = hostname
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
# Synced folders
config.vm.synced_folder "www", "/var/www"
# config.vm.synced_folder "htdocs", "/var/www/magento", nfs: true,
# mount_options: ["nolock", "async"],
# bsd__nfs_options: ["alldirs","async","nolock"]
# "Provision" with hostmanager
config.vm.provision :hostmanager
# Puppet!
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "init.pp"
# Factors
puppet.facter = {
"vagrant" => "1",
"hostname" => hostname,
"db_root_password" => "mysql",
"db_user" => "dbuser",
"db_password" => "dbpass",
"db_name" => "dbname",
"db_name_tests" => "dbname_tests",
"document_root" => "/var/www",
"logs_dir" => "/var/www/logs",
}
end
end