Closed ravi closed 9 years ago
0.6.4 enables you to set a failsafe
flag on any host to allow this host's connection to fail:
plan.target('production', [
{
host: 'www1.example.com',
username: 'pstadler',
agent: process.env.SSH_AUTH_SOCK
},
{
host: 'www2.example.com',
username: 'pstadler',
agent: process.env.SSH_AUTH_SOCK,
failsafe: true // continue flightplan even if connection to www2 fails
}
]);
Docs: https://github.com/pstadler/flightplan#flightplantargetname-hosts-options--this
Great! Thank you.
@pstadler Is there a way to collect such failures programmatically (so they could be reported at the end, for instance)? A cursory scan of the code tells me the answer is 'no', but I wanted to be sure. Thank you.
Unfortunately, there's currently no way of catching errors that happen during connection.
Okay thank you!
This would be a very useful feature: When running a flight plan across a bunch of hosts, report and ignore any per host connection errors. IOW, if the plan cannot be run on one server because the SSH connection failed, do not abort the entire run.