Skip to content

Instantly share code, notes, and snippets.

@pingswept
Created March 16, 2021 15:30
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 pingswept/e5ebeae6187a988e33a013975b5dcb8b to your computer and use it in GitHub Desktop.
Save pingswept/e5ebeae6187a988e33a013975b5dcb8b to your computer and use it in GitHub Desktop.
Fabric demo
from fabric import task
# Usage
#
# fab -H pi@192.168.1.217 --prompt-for-login-password deploy
@task
def deploy(c):
hostname = c.run('hostname', hide=True).stdout
print('\033[32;1mLogged into {0}\033[0m'.format(hostname))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment