title: Long running command in Ansible ending in failed status with host unreachable
body: <p>I have to run a command in Ansible, which takes approximately 30+ minutes to complete. The command has to be executed in serial. The command I am running is nodetool repair in Cassandra and, if we started it parallel, it will hand the process in all machines. As repair in Cassandra cannot run parallel in all machines. </p>
  
  <p>So, we are running them in serial. However, the command sometimes takes long time to complete. </p>
  
  <p>As the command is taking long and my Ansible playbook is dying after waiting for some time, with message node unreachable.</p>
  
  <blockquote>
    <p>{"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true}</p>
  </blockquote>
  
  <p>Is there a way, that I can wait for the process to complete? </p>
  
  <hr>
  
  <p>I am using <code>serial: 1</code> for hosts and running below task</p>
  
  <p>task:</p>
  
  <pre><code>- name: Execute nodetool repair
    command: {{cassandra_installation_dir}}/bin/nodetool repair -j 4
  </code></pre>