vagrant-hostmanager icon indicating copy to clipboard operation
vagrant-hostmanager copied to clipboard

use the scoped config block when running as a provisioner instead of trying to get the global config

Open Roguelazer opened this issue 9 years ago • 2 comments

We have separate hostmanager configuration stanzas for different Providers; right now, if you set a hostmanager config on a provider's override block, it is completely ignored.

This patch fixes it.

I'm not sure if there's some subtle reason that I missed; if so, please let me know and we can brainstorm some other way to fix it.

Example config:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "some-box-name"
  config.hostmanager.ip_resolver = default_proc_used_on_default_provisioner

  config.vm.provider "virtualbox" do |vb, override|
    override.hostmanager.ip_resolver = some_other_proc
  end
end

Roguelazer avatar Dec 21 '15 23:12 Roguelazer

This is still preventing hostmanager from working on Vagrantfiles with provider overrides.

Roguelazer avatar Jul 13 '16 19:07 Roguelazer

I will investigate and test this in the next few days and release if appropriate. Stay tuned.

seth-reeser avatar Jul 13 '16 20:07 seth-reeser