I have a Windows 7 host running Vagrant (1.9.1), from which I start the guest VM with CentOS
I want to pass the Windows environment variable to the guest system through Vagrantfile.
Let us call the environment variable ABC
>echo %ABC%
123
I know that I can pass static values like:
config.vm.provision :shell, path: "scripts/bootstrap.sh", env: {"MYVAR" => "123"}
But I do not know how to translate env var - this does not work (passes the literal:% ABC%):
config.vm.provision :shell, path: "scripts/bootstrap.sh", env: {"MYVAR" => "%ABC%"}
Any help appreciated
source
share