Created
February 9, 2009 23:06
-
-
Save bradwright/61085 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
# Do this when your sudo password on a remote server is different to your local: | |
# for example, when you're unlocking a private key with a local password | |
from fabric import _lazy_format | |
def production(): | |
set(fab_hosts=['myhost.com']) | |
# ask for remote sudo password | |
password = getpass.getpass(_lazy_format("Sudo password? ")) | |
set(fab_password=password) | |
def deploy(): | |
"""Deploy latest version of site to server""" | |
require('fab_hosts', provided_by=['production']) | |
sudo('pwd') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment