title: Ansible Shell Module cannot find file or directory
body: <p>I'm trying to run a rescan and pvresize after growing a disk but the shell  module is returning an rc 127 and these error lines.</p>
  <pre><code> &quot;stderr_lines&quot;: [
          &quot;/bin/bash: echo '1' &gt; /sys/class/block/sdd/device/rescan: No such file or directory&quot;,
          &quot;/bin/bash: line 1: pvresize /dev/sdd: No such file or directory&quot;
      ],
  </code></pre>
  <p>This is the code snippet, I've tried with and without setting the /bin/bash shell and its the same error.</p>
  <pre><code>- name: set disk var
    set_fact:
     disk: /dev/sdd
  - name: rescan and resize 
    shell: |
      &quot;echo '1' &gt; /sys/class/block/{{ disk[5:8] }}/device/rescan&quot;
      &quot;pvresize {{ disk }}&quot;
    become: true
    args:
      executable: /bin/bash
    environment:
      PATH: &quot;/usr/local/sbin:/sbin:/usr/sbin:{{ ansible_env.PATH }}&quot;
  </code></pre>
  <p>I've seen this error before in the command module but adding the sbin to the PATH fixed that there. I am trying to do this with the shell module because even though it says when using the command module that it passes, when actually on the machine it did not and gave a false positive. It did not actually resize the PV and therefore the volume group its part of also did not. So I am trying to test with shell and see if it works.</p>
  <p>This is the command module version</p>
  <pre><code>- name: resize physical volume
    command: &quot;{{ item }}&quot;
    with_items:
     - &quot;echo '1' &gt; /sys/class/block/{{ disk[5:8] }}/device/rescan&quot; #rescan scsi bus
     - &quot;pvresize {{ disk }}&quot;
    become: true
    environment:
      PATH: &quot;/usr/local/sbin:/sbin:/usr/sbin:{{ ansible_env.PATH }}&quot;
  </code></pre>