Random SSH unreachables using delegation in Ansible 2.1.0

So I have a task that delegates a template deployed to one server to a different server. When this task is run on just a single server I get no errors. However if I try running this delegation task on all the servers (16 servers) it needs to be deployed to in a single play, then it will only succeed on only 50%-80% of the servers. The servers that it fails on are random every time I run the play (in dry mode).

Further, when I run the play on all the servers, a handler belonging to a different task only activates for 50%-80% of the servers it was intended to act upon. I am wondering if ansible is acting to fast and the tasks are running over each other? Anybody got an idea as to what is going on? (I don’t even know where to begin to look)

I could just walk through my hosts file and run the play for each server one by one, but then again, that kind of hamstrings a lot of ansible’s power.

Ansible default to running all task on all host before moving to the next task. Forks is default to 5, so this template will have 5 simultaneous runs on the delegate_to host.
So if the template is changing the same file they will interfere with each other.

Ok. Thank you for the tip. I set “forks=1” in the config file and that seems to have contained the problem. Runs a bit slower though.