blob: c14b42d8245c70ac91c19834cab99a2b93cf8da6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<h1 id="plugin-usage"> Plugin Usage </h1> <p>Installing a Vagrant plugin is easy, and should not take more than a few seconds.</p> <p>Please refer to the documentation of any plugin you plan on using for more information on how to use it, but there is one common method for installation and plugin activation.</p> <blockquote class="alert alert-warning"> <p><strong>Warning!</strong> 3rd party plugins can introduce instabilities into Vagrant due to the nature of them being written by non-core users.</p> </blockquote>
<h2 id="installation"> Installation </h2> <p>Plugins are installed using <code>vagrant plugin install</code>:</p> <div class="highlight"><pre class="highlight shell" data-language="shell"># Installing a plugin from a known gem source
$ vagrant plugin install my-plugin
# Installing a plugin from a local file source
$ vagrant plugin install /path/to/my-plugin.gem
</pre></div>
<p>Once a plugin is installed, it will automatically be loaded by Vagrant. Plugins which cannot be loaded should not crash Vagrant. Instead, Vagrant will show an error message that a plugin failed to load.</p> <h2 id="usage"> Usage </h2> <p>Once a plugin is installed, you should refer to the plugin's documentation to see exactly how to use it. Plugins which add commands should be instantly available via <code>vagrant</code>, provisioners should be available via <code>config.vm.provision</code>, etc.</p> <p><strong>Note:</strong> In the future, the <code>vagrant plugin</code> command will include a subcommand that will document the components that each plugin installs.</p> <h2 id="updating"> Updating </h2> <p>Plugins can be updated by running <code>vagrant plugin update</code>. This will update every installed plugin to the latest version. You can update a specific plugin by calling <code>vagrant plugin update NAME</code>. Vagrant will output what plugins were updated and to what version.</p> <p>To determine the changes in a specific version of a plugin, refer to the plugin's homepage (usually a GitHub page or similar). It is the plugin author's responsibility to provide a change log if he or she chooses to.</p> <h2 id="uninstallation"> Uninstallation </h2> <p>Uninstalling a plugin is as easy as installing it. Just use the <code>vagrant plugin uninstall</code> command and the plugin will be removed. Example:</p> <div class="highlight"><pre class="highlight shell" data-language="shell">$ vagrant plugin uninstall my-plugin
</pre></div>
<h2 id="listing-plugins"> Listing Plugins </h2> <p>To view what plugins are installed into your Vagrant environment at any time, use the <code>vagrant plugin list</code> command. This will list the plugins that are installed along with their version.</p><div class="_attribution">
<p class="_attribution-p">
© 2010–2018 Mitchell Hashimoto<br>Licensed under the MPL 2.0 License.<br>
<a href="https://www.vagrantup.com/docs/plugins/usage.html" class="_attribution-link">https://www.vagrantup.com/docs/plugins/usage.html</a>
</p>
</div>
|