running a php script using ansible throws errors
<p>I am trying to run a php script on a remote server using ansible.
Running the script with the ansible user (which ansible uses to login to the server) works perfectly. The ansible task however fails when there are include statements in my php script.</p>

<p>My php script lays in <pre>/srv/project</pre></p>

<p>it tries to include <pre>includes/someLibrary.php</pre>
Everything works fine when running the script as any user with the correct access rights but when running it via an ansible task</p>

<pre>
- name: run script
  shell: 'php /srv/project/script.php'
</pre>

<p>it fails with: <pre>failed to open stream: No such file or directory in /srv/project/includes/someLibrary.php</pre></p>

<p>Running a very basic php script works nicely though.</p>