geerlingguy / ansible-role-nodejs

Ansible Role - Node.js

Home Page:https://galaxy.ansible.com/geerlingguy/nodejs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Role not installing pm2

danielprietsch opened this issue · comments

I am setting up the pm2 patch to be installed, ansible informs that the operation was successful, however accessing the server the pm2 command is not available, I need your help! Thank you!

Define a list of global packages to be installed with NPM.

nodejs_npm_global_packages: ['pm2']

TASK [geerlingguy.nodejs : Ensure npm global packages are installed.] *************************************************************************
changed: [192.168.15.101] => (item=pm2)
changed: [192.168.15.100] => (item=pm2)

playbook

  • hosts: webservers
    become: true
    tasks:

    • name: Update apt cache.
      apt: update_cache=yes cache_valid_time=3600

    • name: Install packages used on environment
      apt:
      name: ['sudo', 'lynx', 'curl', 'git']
      state: latest

    roles:

    - geerlingguy.ntp

    - geerlingguy.apache

    • geerlingguy.nodejs

fucking shit, i dont set to play pm2 with root ... ty

im testing set this var to true and false, and the user root cannot use pm2 command. Only the user vagrant have the pm2 on the PATH... any tip?

im tested with true and false.... and root cannot play pm2 commands.

Set to true to suppress the UID/GID switching when running package scripts. If set explicitly to false, then installing as a non-root user will fail.

npm_config_unsafe_perm: "true"

im need to run without root.. cloosing this, ty