Unable to execute script using ansible shell module
<p>I am trying to run an ansible script to execute a script using the shell module, and it completes the ansible playbook with a status of 'SUCCESS', but the script has not been executed for some reason.</p>

<p>Playbook:</p>

<pre><code>- hosts: '{{ hosts }}'
  tasks:
  - name: Copy a dummy file to /tmp folder
    command: "cp /apps/tomcat-web/LICENSE /tmp/LICENSE-{{ ansible_date_time.iso8601 }}"

  - name: Start email service
    shell: ./start.sh &gt;&gt; /tmp/log.txt
    args:
      chdir: /email-service/
</code></pre>

<p>Console Output:</p>

<pre><code>+ ansible-playbook deploy/test-ansible.yml --extra-vars hosts=mut

PLAY [mut] ****************************************************************

TASK [setup] *******************************************************************
ok: [ftp2]

TASK [Copy a dummy file to /tmp folder] ****************************************
changed: [ftp2]

TASK [Start email service] *****************************************************
changed: [ftp2]

PLAY RECAP *********************************************************************
ftp2                   : ok=3    changed=2    unreachable=0    failed=0   

Finished: SUCCESS
</code></pre>

<p>The first step in the playbook (creating a license file) is being done properly. But the second step (executing start.sh) is not being done. Can anyone explain? Will be much appreciated.</p>

<p>Note: The script's full path is /email-service/start.sh
Thanks!</p>