Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling auto network globally #32

Open
raags opened this issue May 15, 2015 · 1 comment
Open

Enabling auto network globally #32

raags opened this issue May 15, 2015 · 1 comment

Comments

@raags
Copy link

raags commented May 15, 2015

I tried to add the following to global vagrant file ~/.vagrant.d/Vagrantfile hoping this enables autonetwork for all nodes :

if Vagrant.has_plugin?("vagrant-auto_network")
  config.vm.network :private_network, :auto_network => true
end

This is my vagrant file :

Vagrant.configure(2) do |config|
  config.vm.define "test" do |node|
    node.vm.hostname = "test1"
  end

  config.vm.define "test1" do |node|
    node.vm.hostname = "test2"
  end
end

But both end up with the same ip address.

@Sharpie
Copy link
Member

Sharpie commented Sep 21, 2015

Auto_network works by searching configuration for the :auto_network => true parameter and replacing it with a static :ip => ... parameter. So, this would be an expected outcome: one piece of global configuration gets mapped to one static IP address.

Properly implementing this would require adding a bunch of logic that creates a copy of the configuration on each VM, deletes the global value, and then does IP assignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants