When I define a task to run on several remote servers, if the task runs on server one and exits with an error, Fabric will stop and abort the task. But I want to make fabric
As of Fabric 1.5, there is a ContextManager that makes this easier:
from fabric.api import sudo, warn_only
with warn_only():
sudo('mkdir foo')
Update: I re-confirmed that this works in ipython using the following code.
from fabric.api import local, warn_only
#aborted with SystemExit after 'bad command'
local('bad command'); local('bad command 2')
#executes both commands, printing errors for each
with warn_only():
local('bad command'); local('bad command 2')