Created
March 16, 2021 15:30
-
-
Save pingswept/e5ebeae6187a988e33a013975b5dcb8b to your computer and use it in GitHub Desktop.
Fabric demo
This file contains 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 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