title: Unable to run multiple command parellely in background on remote host using Jenkins
body: <p>I have a jenkins job DSL that run on a remote node (Linux OS) using "Restrict where this project can be run" Label.</p>
  
  <p>It has "Build" step -> "Execute shell"</p>
  
  <p>In the execute shell i have mentioned </p>
  
  <pre><code>sh /app/runalljobs.sh &amp;
  </code></pre>
  
  <p>On the remote node host runalljobs.sh looks like below:</p>
  
  <pre><code>cat runalljobs.sh
  
  ansible-playbook /app/test.yml -e argu=arg1
  ansible-playbook /app/test.yml -e argu=arg2
  .....
  .....
  ansible-playbook /app/test.yml -e argu=arg16
  </code></pre>
  
  <p>The runalljobs.sh is suppose to start 16 ansible processes in the background when runalljob.sh is executed. </p>
  
  <p>This works fine when the script is executed manually from the remote node putty shell. </p>
  
  <p>However, I want the script to start the ansible processes to run in the background on the remote node when invoked using jenkins job which is not happening.</p>
  
  <p>I also tried commenting <code>sh /app/runalljobs.sh &amp;</code></p>
  
  <p>and adding individual ansible command in the "Execute shell" as below:</p>
  
  <pre><code>ansible-playbook /app/test.yml -e argu=arg1 &amp;
  ansible-playbook /app/test.yml -e argu=arg2 &amp;
  .....
  .....
  ansible-playbook /app/test.yml -e argu=arg16 &amp;
  </code></pre>
  
  <p>But this too did not trigger the ansible processes on the target node. </p>
  
  <p>It works if i remove the "&amp;" and then all the ansible commands runs serially one after the other on remote. </p>
  
  <p>However, I wish all the ansible commands to be triggered parallely in the background and the Jenkins executor should proceed into executing other execute shell tasks.</p>
  
  <p>Can you please suggest how can i acheive the requirement ?</p>