Created
August 24, 2012 00:09
-
-
Save callmephilip/3443827 to your computer and use it in GitHub Desktop.
[Python Fabric] passing arguments to a task
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
def new_user(username, admin='no', comment="No comment provided"): | |
log_action("New User (%s): %s" % (username, comment)) | |
pass | |
$ fab new_user:myusername | |
$ fab new_user:username=myusername | |
$ fab new_user:myusername,yes | |
$ fab new_user:myusername,admin=yes | |
$ fab new_user:myusername,admin=no,comment='Gary\, new developer (starts Monday)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment