-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
29 lines (25 loc) · 1012 Bytes
/
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
$HOSTNAME = "galuchat.dev"
$BOX = "ubuntu/xenial64"
$IP = "10.0.0.10"
$MEMORY = ENV.has_key?('VM_MEMORY') ? ENV['VM_MEMORY'] : "1024"
$CPUS = ENV.has_key?('VM_CPUS') ? ENV['VM_CPUS'] : "1"
$EXEC_CAP = ENV.has_key?('VM_EXEC_CAP') ? ENV['VM_EXEC_CAP'] : "100"
Vagrant.configure("2") do |config|
config.vm.hostname = $HOSTNAME
config.vm.box = $BOX
config.vm.network :private_network, ip: $IP
config.ssh.forward_agent = true
config.vm.synced_folder ".", "/var/www/galuchat/current", type: "nfs"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provider "virtualbox" do |v|
v.name = "galuchat"
v.customize ["modifyvm", :id, "--cpuexecutioncap", $EXEC_CAP]
v.customize ["modifyvm", :id, "--memory", $MEMORY]
v.customize ["modifyvm", :id, "--cpus", $CPUS]
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "devops/provisioning/playbook.yml"
ansible.inventory_path = "devops/provisioning/hosts/vagrant"
ansible.limit = 'all'
end
end