-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
73 lines (55 loc) · 2.04 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
68
69
70
71
72
73
# -*- mode: ruby -*-
# vi: set ft=ruby :
%w{ vagrant-hostmanager vagrant-auto_network vagrant-triggers }.each do |plugin|
unless Vagrant.has_plugin?(plugin)
raise "#{plugin} plugin is not installed. Please install with: vagrant plugin install #{plugin}"
end
end
# tunables
project = 'slicklabs'
hostname = "#{project}.local"
extra_hostnames = []
ansible_solr_enabled = false
ansible_https_enabled = false
ansible_project_web_root = "web"
ansible_timezone = "America/Chicago"
ansible_system_packages = []
# end tunables
Vagrant.configure(2) do |config|
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.vm.define "#{project}" do |box|
box.vm.box = "palantir/drupalbox"
box.vm.box_version = ">= 0.2.4, < 1.0.0"
box.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = "2048"
end
box.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
box.vm.hostname = "#{hostname}"
box.vm.network :private_network, :auto_network => true
box.hostmanager.aliases = extra_hostnames
box.vm.synced_folder ".", "/vagrant", :disabled => true
box.vm.synced_folder ".", "/var/www/#{hostname}", :nfs => true
box.ssh.forward_agent = true
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "vendor/palantirnet/the-vagrant/conf/vagrant/provisioning/drupal8-skeleton.yml"
ansible.groups = {
"all:children" => ["#{project}"]
}
ansible.extra_vars = {
"project" => project,
"hostname" => hostname,
"solr_enabled" => ansible_solr_enabled,
"https_enabled" => ansible_https_enabled,
"project_web_root" => ansible_project_web_root,
"timezone" => ansible_timezone,
"system_packages" => ansible_system_packages,
}
end
config.trigger.before [:up, :reload] do
run "composer install --ignore-platform-reqs"
end
end