config.vm.define "#{VM_NAME}" do |cfg|

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

config.vm.define "#{VM_NAME}" do |cfg|

J Healy
Being new to both Vagrant and Ruby I'm curious as why this works fine in an each loop, but when I do 'vagrant ssh cs_devbox_0' it says the vm/box isn't found and I have to do 'global-status' to get the id to operate on the vm. I get that it can't derive the name from the variable, but I don't see why it couldn't.

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

config.vm.define "#{VM_NAME}" do |cfg|

VMTrooper
Joseph, where are you setting the VM_NAME variable?  I use a similar convention where I declare a list/hash of VM names earlier in my Vagrantfile, and then use a loop to deploy an instance for each name.

Can you post your entire Vagrantfile here? or in a pastebin/github gist and share the link?

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.