Specify multiple redundant Vagrant box URLs

Vagrant is awesome, but there are times where you might need to specify redundant/alternative URLs in a Vagrantfile.  This could be a failover type scenario, although in my case, I needed it to give external developers access to our Vagrantbox, which we made a copy of on the interwebs.  The below goes in the Vagrantfile, and does an HTTP HEAD request to see if the Vagrant box is available.  If so, it uses it; otherwise, it’ll default to the public Vagrant box.

I hope that helps!

Leave a Reply

Your email address will not be published. Required fields are marked *