Is it possible to have Ansible retry on connection failure?
<p>I am facing this annoying bug: <a href="https://github.com/ansible/ansible/issues/18188" rel="noreferrer">Ansible hosts are randomly unreachable #18188
</a>.</p>

<p>Is there a way to tell Ansible that if SSH connection fails, to try it once more? Or 2 times more?</p>

<p>According this post <a href="http://grokbase.com/t/gg/ansible-project/161ba72srq/new-ssh-retry-in-ansible-2-0" rel="noreferrer">New SSH Retry In Ansible 2.0?</a> there is "retries" option but it doesn't seem very trustworthy to me, the person who posted didn't even get SSH header right and there is no mention of this in Ansible docs.</p>