Whatever the command line options connection sharing configured in
~/.ssh/config stays somehow active, and cause errors.
Ansible has custom code to detect the situation and automatically
restart a SSH connection (see AnsibleControlPersistBrokenPipeError usage
in lib/ansible/plugins/connection/ssh.py, also relevant is bug#16731).
The only reliable fix is thus to change ~/.ssh/config to limit
connection sharing to apply to some hosts only.
This script provides parallel remote execution of commands, while having
some special knownledge of servers that should *not* be handled in parallel.
It defers terminal-handling to tmux(1).
It has some targeting capacities using keywords. Commas for 'OR' and slashes
for 'AND', ex: ext/test,saas/test/passerelle will select all external test
servers + all passerelle servers on the SaaS.
It takes any shell command and has some builtin shortcuts such as apt.update
and apt.upgrade. (that's the whole lot, actually).
Regarding actual performance benefits, apt upgrade with no packages to
upgrade:
$ time eoptasks -k ext/test apt.upgrade
real 0m24,249s
user 0m0,140s
sys 0m0,025s
$ time eotasks -g ext_test apt.upgrade
real 6m9,956s
user 3m32,096s
sys 0m2,322s