Bug 1320693 - Vagrant: Only enable DCHP networking on NFS platforms

NFS isn't available on Windows, so the additional virtual network
adapter is unnecessary.
This commit is contained in:
Ed Morley 2017-05-09 20:18:16 +01:00
Родитель 0939da0baa
Коммит d247c01782
1 изменённых файлов: 6 добавлений и 2 удалений

8
Vagrantfile поставляемый
Просмотреть файл

@ -5,8 +5,6 @@
Vagrant.require_version ">= 1.5.0"
Vagrant.configure("2") do |config|
# required for NFS to work
config.vm.network "private_network", type: "dhcp"
# for webpack-devserver access from host
config.vm.network "forwarded_port", guest: 5000, host: 5000, host_ip: "127.0.0.1"
# for web server access from host
@ -14,6 +12,12 @@ Vagrant.configure("2") do |config|
# for DB access from host
config.vm.network "forwarded_port", guest: 3306, host: 3308, host_ip: "127.0.0.1"
if !Vagrant::Util::Platform.windows?
# On platforms where NFS is used (ie all but Windows), we still have to use
# Virtualbox's hostonly networking mode so that NFS works.
config.vm.network "private_network", type: "dhcp"
end
config.vm.synced_folder ".", "/home/vagrant/treeherder", type: "nfs"
config.vm.provider "virtualbox" do |vb, override|