-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
28 lines (27 loc) · 980 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
Vagrant.configure("2") do |config|
config.vm.box = "chef/centos-7.0"
# config.vm.box = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.1_chef-provisionerless.box"
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 4
end
config.vm.network :private_network, ip: "192.168.33.10"
config.vm.network :forwarded_port, guest: 3000, host: 3000
# Use rbconfig to determine if we're on a windows host or not.
require 'rbconfig'
is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
if is_windows
# Provisioning configuration for shell script.
config.vm.provision "shell" do |sh|
sh.path = "windows.sh"
sh.args = "vagrant_windows.yml"
end
else
# Provisioning configuration for Ansible (for Mac/Linux hosts).
config.vm.provision "ansible" do |ansible|
ansible.playbook = "vagrant.yml"
ansible.sudo = true
# ansible.ask_vault_pass = true
end
end
end