Too young too simple and too naive

home

fabric to deploy vagrant env

14 Apr 2013

Vagrant is a great tool that lets you create and destroy virtualbox vms. I will use fabric to the deployment stack, I will do all the fine grained post-install and post-configure tasks with it.

Below is step by step guide:

$ vagrant add box precise32 http://files.vagrantup.com/precise32.box

from fabric.api import *
def vagrant():
    env.user='vagrant'
    env.hosts=['127.0.0.1:2222']
    result = local('vagrant ssh-config | grep IdentityFile', capture=True)
    env.key_filename = result.split()[1].trip('\"')
def uname():
    run('uname -a')
comments powered by Disqus