Is there a way to check the version of the currently running box from within the Vagrantfile? We intentionally disable the automated check because we control the version release and we don't want users updating themselves, but we need a way for them to check the version of the box that they are using, and putting this into the post_up_message would be the best way.
On Friday, May 9, 2014 at 12:14:54 PM UTC-5, Mitchell Hashimoto wrote: > > Diego, > > Vagrant::VERSION > > On Fri, May 9, 2014 at 10:03 AM, Diego Zamboni <[email protected] > <javascript:>> wrote: > > Hi, > > > > I'd like to use the new 1.6 post_up_message option to display some > messages > > about my VM's configuration, but while retaining Vagrantfile > compatibility > > with pre-1.6 Vagrant (I was printing out the information using puts > before). > > Is there a way to check the exact Vagrant version from within the > > Vagrantfile? I'd like to do something like this: > > > > if vagrant.version < 1.6 > > puts "foo" > > else > > config.vm.post_up_message "foo" > > end > > > > Is this possible? > > > > Thanks, > > --Diego > > > > -- > > 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] <javascript:>. > > 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.
