Check vagrant version in Vagrantfile
To access the used version of vagrant in a vagrant file you can use the (undocumented) Vagrant::VERSION
constant. Combine this with Ruby's own Gem::Version
and you can create a nice switch to handle deprecated configuration in the Vagrantfile.
Here is an example: