Created
January 26, 2012 21:43
-
-
Save ers81239/1685287 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 | |
#fabric parallel test file | |
from fabric.api import * | |
@parallel | |
def parFunc(): | |
print env.host | |
@serial | |
def serFunc(): | |
print env.host | |
execute(parFunc,hosts=["root@grizzly"]) | |
execute(serFunc,hosts=["root@grizzly"]) | |
""" | |
Output | |
[root@grizzly] Executing task 'parFunc' | |
root@grizzly | |
[root@grizzly] Executing task 'serFunc' | |
grizzly | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment