Hi Michael, I'm not aware of a way to make that work despite trying a few different times. I eventually settled on a naming convention and using the built-in regular expression functionality of the vagrant commands. Sorry I couldn't be of more help.
-Chris config.vm.define 'foobar_foo' do |foo| ... end config.vm.define 'foobar_bar' do |foo| ... end config.vm.define 'stuff_something' do |something| ... end $ vagrant up /foobar/ On Mon, Jun 8, 2015 at 11:13 PM, Michael O'Connor < [email protected]> wrote: > Hi, I've been trying to figure out if there is a way to define a group of > vms within a Vagrantfile in such a way that I could call vagrant up <group > name> and bring up the specified group of vms > > For example I tried something similar to the following: > config.vm.define 'foobar-group' do |foobar| > foobar.vm.define 'foo' do |foo| > foo.vm.hostname = 'foo' > ... > end > foobar.vm.define 'bar' do |bar| > bar.vm.hostname = 'bar' > ... > end > end > > config.vm.define 'stuff-group' do |stuff| > stuff.vm.define 'some-stuff' do |something| > something.vm.hostname = 'something' > ... > end > ... > end > > Basically I was hoping I'd be able to call vagrant up foobar-group and get > only the vms in that group to come up, however this does not work at all. > > Is there a way to do this other than using some sort of naming convention > and a pattern with vagrant up? > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
