Skip to content

Instantly share code, notes, and snippets.

@jamescw
Created May 23, 2012 10:18
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 jamescw/2774442 to your computer and use it in GitHub Desktop.
Save jamescw/2774442 to your computer and use it in GitHub Desktop.
Create vagrant VMs using fabric
from fabric.api import *
def create_local_vm(name=None, image="lucid32"):
if not name:
name = env.project + "_VM"
local("vagrant box add {0} http://files.vagrantup.com/{1}.box".format(name,image))
local("vagrant init {0}".format(name))
def run_local_vm():
local("vagrant up")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment