Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created June 1, 2012 21:29
Show Gist options
  • Save mitchellh/2855234 to your computer and use it in GitHub Desktop.
Save mitchellh/2855234 to your computer and use it in GitHub Desktop.
Easy Plugin in Vagrant 1.1
# Just throw this in a Vagrant 1.1 Vagrantfile and you get the
# `vagrant fab` command that does what you expect. The command
# to run in fab should go after "--" in the command line, example:
#
# vagrant fab -- deploy:production
# vagrant fab -- -l
#
# Easy plugins. The future.
class Plugin < Vagrant.plugin("1")
name "fab"
easy_command "fab" do |api|
command = api.arg_extra
api.run("cd /vagrant && fab #{command}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment