Specify Vagrantfile path explicity, if not plugin

Further to Andrew Lorente’s answer, you can also use the VAGRANT_VAGRANTFILE environment variable to specify the filename of the Vagrantfile. This has the advantage over VAGRANT_CWD of not changing the current working directory which can be useful when relying on relative paths.

For example, the following will run vagrant up on Vagrantfile.other:

VAGRANT_VAGRANTFILE=Vagrantfile.other vagrant up

Notes

  • This used to appear to be an undocumented feature which was only visible in the source code.
  • In later releases this is now documented in the Hashicorp docs here: Environmental Variables.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)