running sbt command from ansible shell
<p>I am trying to run a sbt command using ansible's shell command as follows from the main.yml in a role's task directory:</p>

<pre><code>- shell: ./sbt clean reload compile
</code></pre>

<p>I have also tried the following:</p>

<pre><code>- shell: /usr/sbin/sbt clean reload compile
</code></pre>

<p>Neither command works.  The output from <strong>which sbt</strong> is</p>

<pre><code>/usr/bin/sbt
</code></pre>

<p>The error message I get from ansible is:</p>

<pre><code>fatal: [testserver]: FAILED! =&gt; {"changed": true, "cmd": "/usr/bin/sbt clean reload compile", "delta": "0:00:00.062588", "end": "2016-10-04 21:36:26.883947", "failed": true, "rc": 127, "start": "2016-10-04 21:36:26.821359", "stderr": "/bin/sh: 1: /usr/bin/sbt: not found", "stdout": "", "stdout_lines": [], "warnings": []}
</code></pre>