2013-11-23 20:23:34 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2013-11-23 20:23:34 +00:00
|
|
|
page_title: "Minimum Vagrant Version - Vagrantfile"
|
2016-01-19 18:08:53 +00:00
|
|
|
sidebar_current: "vagrantfile-minversion"
|
|
|
|
description: |-
|
|
|
|
A set of Vagrant version requirements can be specified in the Vagrantfile
|
|
|
|
to enforce that people use a specific version of Vagrant with a Vagrantfile.
|
|
|
|
This can help with compatibility issues that may otherwise arise from using
|
|
|
|
a too old or too new Vagrant version with a Vagrantfile.
|
2013-11-23 20:23:34 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Minimum Vagrant Version
|
|
|
|
|
|
|
|
A set of Vagrant version requirements can be specified in the Vagrantfile
|
|
|
|
to enforce that people use a specific version of Vagrant with a Vagrantfile.
|
|
|
|
This can help with compatibility issues that may otherwise arise from using
|
|
|
|
a too old or too new Vagrant version with a Vagrantfile.
|
|
|
|
|
|
|
|
Vagrant version requirements should be specified at the top of a Vagrantfile
|
|
|
|
with the `Vagrant.require_version` helper:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
Vagrant.require_version ">= 1.3.5"
|
|
|
|
```
|
|
|
|
|
|
|
|
In the case above, the Vagrantfile will only load if the version loading it
|
|
|
|
is Vagrant 1.3.5 or greater.
|
|
|
|
|
|
|
|
Multiple requirements can be specified as well:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
Vagrant.require_version ">= 1.3.5", "< 1.4.0"
|
|
|
|
```
|