A versão 1.1 do Vagrant foi lançada. A documentação que você está lendo é para o Vagrant 1.0.x. Leia mais sobre o Vagrant 1.1 no anúncio de lançamento. Acesse agora a documentação da versão 1.1.

Documentation for the Vagrant Experimental Series (1.x)

You're viewing the documentation for the experimental version of Vagrant (the 1.x series). The current stable series is 1.0.x and the documentation can be found here. You can learn more about the Vagrant versioning scheme here.

Using Plugins

Installing Plugins

Vagrant plugins are easy to install and easy to use. Plugins are typically distributed as a RubyGem, Ruby’s packaging system. RubyGems can be installed with Vagrant using the vagrant gem command. For example, if we want to install the foo plugin:

$ vagrant gem install foo
...

Some very simple plugins may also be distributed simply as a single blob of Ruby code. If this is done, you can just paste it into your Vagrantfile.

Enabling Plugins

Once a plugin is installed, you need to enable it. This can be done in one of two places: a Vagrantfile or .vagrantrc in your home directory. Enabling a plugin in a project Vagrantfile only enables that plugin for that project, but also requires that everyone using that project on your team has that plugin installed. Enabling a plugin in the .vagrantrc file in your home directory enables the plugin for all projects for that user.

Plugins are enabled using the Vagrant.require_plugin command:

Vagrant.require_plugin "foo"

require_plugin works much like Ruby’s built-in require, except Vagrant will do some additional checks and throw human-friendly errors if something fails while loading the plugin.