Consider this simple fabric file:
def wrapper():
f1()
f2()
@hosts([host1])
def f1():
run('ls')
@hosts([host2])
def f2():
开发者_如何学JAVA run('uname')
By running fab wrapper
you get a prompt for:
No hosts found. Please specify a (single) host string for connection:
How can I make wrapper()
ignore any hosts, and assume all sub-tasks will handle that aspect?
Fabric issue #21 deals with this longstanding problem.
execute()
now supports this behavior.
精彩评论