Created
June 13, 2015 14:29
-
-
Save hanksudo/fec0371929394a4b9070 to your computer and use it in GitHub Desktop.
Use Fabric with Vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import env, local, run | |
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] | |
def uname(): | |
run('uname -a') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment