ansible run command on remote host in background
<p>I am trying to start filebeat (or for that matter any other process which will run continuously on demand) process on multiple hosts using ansible. I don't want ansible to wait till the process keeps on running. I want ansible to fire and forget and come out and keep remote process running in back ground.
I've tried using below options:</p>

<pre><code>    ---
    - hosts: filebeat
      tasks:
      - name: start filebeat
option a)  command: filebeat -c filebeat.yml &amp;
option b)  command: nohup filebeat -c filebeat.yml &amp;
option c)  shell: filebeat -c filebeat.yml &amp;
           async: 0 //Tried without as well. If its &gt; 0 then it only waits for that much of time and terminates the filebeat process on remote host and comes out.
           poll: 0
</code></pre>