Created
May 4, 2014 23:22
-
-
Save evaldobarbosa/51c41b78e579a74dddf4 to your computer and use it in GitHub Desktop.
Configuração de rede em VagrantFile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.define 'nome_do_host' do |node| | |
node.vm.hostname = "nome_do_host" | |
## USE A LINHA A SEGUIR SE QUISER | |
## USAR O IP DE UMA REDE PRIVADA | |
node.vm.network :private_network, ip: "192.168.56.1" | |
## OU USE A LINHA A SEGUIR SE QUISER | |
## USAR A MÁQUINA NA MESMA REDE | |
## EM MODO BRIDGE | |
config.vm.network "public_network", :bridge => 'wlan0' | |
node.vm.synced_folder "./", "/home/vagrant/", id: "vagrant-root", :nfs => false | |
node.vm.synced_folder "./www", "/var/www/", id: "vagrant-www", :nfs => false | |
end |
Você pode definir no próprio comando o IP estático desejado:
config.vm.network "public_network", ip: "192.168.0.1", bridge: "wlan0"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No modo Bridge ele pega via DHCP, como faço para configurar um ip estatico ?