Skip to content

Instantly share code, notes, and snippets.

@xthiago
Forked from rogeriopradoj/gist:6954261
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xthiago/b16b99c7ac131f6dbe94 to your computer and use it in GitHub Desktop.
Save xthiago/b16b99c7ac131f6dbe94 to your computer and use it in GitHub Desktop.
How is listed with vagrant plugin list How to use in Vagrant.has_plugin? link to plugin.rb in repo
bindler Bindler fgrehm/bindler
vagrant-hostmanager HostManager smdahlen/vagrant-hostmanager
vagrant-cachier vagrant-cachier fgrehm/vagrant-cachier
vagrant-aws AWS mitchellh/vagrant-aws
vagrant-rackspace RackSpace Cloud mitchellh/vagrant-rackspace
vagrant-hp HP mohitsethi/vagrant-hp
vagrant-digitalocean DigitalOcean smdahlen/vagrant-digitalocean

Example when plugin is not installed

# Warns to use Bindler
unless Vagrant.has_plugin?("Bindler")
  puts "--- WARNING ---"
  puts "I'm using Bindler, https://github.com/fgrehm/bindler"
  puts "It's for 'Dead easy Vagrant plugins management'"
  puts "If you have not it installed in your system,"
  puts "visit https://github.com/fgrehm/bindler#installation for more information"
end

# Vagrant.configure("2") do |config| ...

Example when plugin is installed

# Vagrant.configure("2") do |config| ...

  # configs for vagrant-cachier
  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.auto_detect = true
  end
  
  # configs for vagrant-hostmanager
  if Vagrant.has_plugin?("HostManager")
    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
  end

# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment