We are facing a situation where we have servers with slow and unstable network connections. This is because the network is provided by GSM modems onboard moving vessels.
Does anyone know how Ansible will handle a situation where the network may fall out during deployment? Will the deployment happen in a somewhat atomic way, or will the deployment be abruptly aborted if the ssh channel terminates?
If the connection closes ansible-playbook will mark the host as
'unreachable' and remove it from the rest of the play, the task
depends a lot on the module, most of the fie based modules do atomic
operations so should leave the system in a consistent state (though
you might have some temp files left over).
In 2.0 we added retry logic to the ssh connection plugin which could
be used to prevent the host from becoming 'unreachable'.
For such a setup you can also look at using ansible-pull and have the
devices attempt to download their plays and data, once that happens
they can run the playbook locally w/o worrying about interruptions.