Reputation: 9185
I read that it's possible to create a file with the name "id" and with the written id inside and put it into .vagrant/... directory. But is it also possible to determine the id in the vagrantfile?
Upvotes: 2
Views: 3825
Reputation: 53793
As Vagrantfile is a ruby script you can always read the id file from Vagrantfile
Vagrant.configure(2) do |config|
p "read uuid " + File.read(".vagrant/machines/default/virtualbox/index_uuid")
p "read id " + File.read(".vagrant/machines/default/virtualbox/id")
Upvotes: 3