Pergunta

I have not found any information on how to explicitly set vagrant environment variables.

I'm trying to do what's described in these docs to set VAGRANT_DEFAULT_PROVIDER to vmware_fusion so I don't always have to use vagrant up --provider=vmware_fusion.

I have put this line in my Vagrantfile.

VAGRANT_DEFAULT_PROVIDER = "vmware_fusion"

It doesn't work, and I assume that must mean I have no idea what I'm doing, and must be doing it wrong. When I run vagrant up it still uses the default virtualbox provider.

Foi útil?

Solução

You'd need to issue

export VAGRANT_DEFAULT_PROVIDER="vmware_fusion"

in your shell. To make the change permanent add this line to your .bashrc/.bash_profile.

Outras dicas

If you want to set the default provider for a specific project only, you can set it also in Vagrantfile:

ENV['VAGRANT_DEFAULT_PROVIDER'] = "vmware_fusion"

Vagrant.configure('2') do |config|
  # ...
end
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top