Skip to content

Instantly share code, notes, and snippets.

@pingswept
Created March 16, 2021 15:30
Show Gist options
  • 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 [email protected] --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