I have the following line in my Vagrantfile:
config.vm.provision :shell, path: "provisioning/myscript.sh"
I would like to toggle running that script based on an environment variable being set in the host (which may not be present). If the value is present and equals true
I want the script skipped, otherwise it should run e.g.
if [ ENV[SKIP_MY_SCRIPT] != 'true' ]
config.vm.provision :shell, path: "provisioning/myscript.sh"
end
Or is there a better way (e.g. pass env into the script somehow)?