-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
35 lines (27 loc) · 1.17 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
# -*- 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.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = "react.vm"
config.vm.network :private_network, ip: "33.33.33.20"
config.vm.box = "bento/ubuntu-14.04"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", `#{RbConfig::CONFIG['host_os'] =~ /darwin/ ? 'sysctl -n hw.ncpu' : 'nproc'}`.chomp]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--memory", 1024]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
config.vm.provision "ansible" do |ansible|
ansible.inventory_path = "automation/vagrant"
ansible.limit = "all"
ansible.playbook = "automation/provision.yml"
ansible.verbose = false
if ENV['ANSIBLE_TAGS'] != nil
puts "Setting ansible.tags=#{ENV['ANSIBLE_TAGS']}"
ansible.tags = "#{ENV['ANSIBLE_TAGS']}"
end
end
config.vm.network :forwarded_port, guest: 22, host: 22022, id: "ssh"
config.vm.synced_folder ".", "/var/www/react.js", :nfs => true
end