title: How to run global npm binaries with Ansible
body: <ol>
  <li>I've set my npm global install path with <code>npm config set prefix '~/.npm-packages</code></li>
  <li>I've updated my PATH to include this. In <code>~/.profile</code> I have <code>PATH="$HOME/.npm-packages/bin:$PATH"</code></li>
  <li>I have installed gulp with <code>npm install -g gulp</code>, verifying that it exists in <code>~/.npm-packages/bin/gulp</code></li>
  <li>I have verified that it is in my PATH and executable by SSHing into my remote machine and typing <code>gulp</code></li>
  </ol>
  
  <p>I'm using the following Ansible task:</p>
  
  <pre><code>name: Run gulp
  command: gulp
  args:
    chdir: app/
  </code></pre>
  
  <p>but it always errors out with the following:</p>
  
  <pre><code>{"cmd": "gulp", "failed": true, "rc": 2}
  msg: [Errno 2] No such file or directory
  </code></pre>
  
  <p>Why am I able to run <code>gulp</code> from a SSH session but not via Ansible?</p>