Thanks for this solution!

While this works, it also has the effect of not "seeing" the vm in commands 
like "vagrant status" without adding "secondary=true" (although I know I can 
set an environment variable).

I'd still be willing to put in the time for a proper "autostart" flag if this 
is more than just an edge case I dreamt up.


Ramon


On 18 Feb 2014, at 01:23, Alvaro Miranda Aguilera <[email protected]> wrote:

> My suggestion will be, in the vagrant file, around the secondary machine 
> write this:
> 
>   if ENV["secondary"]
> 
>   <BLOCK FOR SECONDARY BOX>
>   end
> 
> 
> so you can then do
> 
> 
> secondary=true vagrant up secondary
> 
> 
> 
> 
> 
> On Mon, Feb 17, 2014 at 9:37 PM, <[email protected]> wrote:
> [ I apologise for this issue I posted to the github repo 
> (https://github.com/mitchellh/vagrant/issues/2983), when it's just a question 
> and not a bug ]
> 
> 
> Hi all,
> 
> I'd like to add two boxes called primary and secondary to a Vagrantfile, but 
> only startup primary when I run
> 
> vagrant up
> 
> Starting the secondary box would require an explicit
> 
> vagrant up secondary
> 
> Is this possible?
> 
> I've added primary: true to the primary box, but there doesn't seem to be a 
> way to avoid the secondary box from starting up.
> (a little background: I have a project containing a development box that 
> everyone should use to work with the project, but I also add a 
> "production-test" box to test provisioning and deployment Ansible scripts 
> agains a box set up like a production server. This "production-test" box is 
> overhead for regular developers)
> Regards,
> Ramon de la Fuente
> @f_u_e_n_t_e
> 
> 
> 
> -- 
> 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/groups/opt_out.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Vagrant" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/vagrant-up/rwhBN4nJn4k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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/groups/opt_out.

Reply via email to