流浪提供程序特定的主机管理器设置



听起来很简单-我正在尝试仅为Virtualbox打开vagrant hostmanager插件。

所以我尝试重写:

config.hostmanager.enabled = false
...
config.vm.provider "virtualbox" do |vb|
    vb.hostmanager.enabled = true
    ...
end
config.vm.provider "azure" do |azure|
    # do nothing
    ...
end

然而,流浪汉抱怨:

There are errors in the configuration of this machine. Please fix the following errors and try again:
VirtualBox Provider:
* The following settings shouldn't exist: hostmanager

编辑:我也试过…

config.vm.provider "virtualbox" do |vb,override|
    override.hostmanager.enabled = true
    ...
end

这不会抛出错误,但也不会运行hostmanager:(

我做错了什么?

当我配置像

这样的东西时,我有同样的错误
config.vm.hostmanager.aliases = %w(my.example.local)

但正确的是

config.hostmanager.aliases = %w(my.example.local)

也许你也打错了?

相关内容

最新更新