weareinteractive / ansible-pm2

Ansible role which installs pm2 and manages apps
MIT License
82 stars 29 forks source link

Force become when installing startup script. #14

Closed alexsegura closed 7 years ago

alexsegura commented 8 years ago

Hello,

Maybe this is a Vagrant bug, but I have the following problem:

When PM2 runs as root, changes on files in shared folders are not detected by PM2 when using the watch option. When PM2 runs as vagrant user, it works.

So I need to run this role with become=no

roles:
    - { role: weareinteractive.pm2, become: no }

BUT if I do that the startup script is not installed correctly because it needs to be run as root.

So I forced become=yes for this command.

franklinkim commented 7 years ago

Yeah, might be a vagrant bug or sth else... I think there should be an option to define an user to run the apps... in this way you don't have to force the become on install.

alexsegura commented 7 years ago

Ok I'll do that 👍

franklinkim commented 7 years ago

This looks good! Did you have a chance to check out #16?

alexsegura commented 7 years ago

Thanks!

Sorry for the "WIP" in the commit message, you should have rebased my commit when you fixed it.

So it was ansible_user_id... 😐