---
- shell: source ~/.nvm/nvm.sh && dirname $(which node)
  register: node_path
  args: 
    executable: /bin/bash
- npm: name={{ item }} global=yes state=present executable="{{node_path.stdout}}/npm"
  with_items:
  - node-check-updates
  - pm2
  - commitizen
  - resin-cli
  environment:
    PATH: "{{ ansible_env.PATH }}:{{node_path.stdout}}"


---
- shell: source ~/.nvm/nvm.sh && dirname $(which node)
  register: node_path
  args: 
    executable: /bin/bash
- npm: name={{ item }} global=yes state=present executable="{{node_path.stdout}}/npm"
  with_items:
  - npm-check-updates
  - pm2
  - commitizen
  - resin-cli
  environment:
    PATH: "{{ ansible_env.PATH }}:{{node_path.stdout}}"


Update incorrectly named npm package
Update incorrectly named npm package
