Enable PM2 to automatically restart Open Terms Archive applications after a reboot#56
Enable PM2 to automatically restart Open Terms Archive applications after a reboot#56
Conversation
MattiSG
left a comment
There was a problem hiding this comment.
Does that respect the fact that the engine would run only if started with --schedule? We don't want to have it get started all the time!
roles/pm2/manage/tasks/main.yml
Outdated
|
|
||
| - name: Generate and enable PM2 startup script | ||
| ansible.builtin.command: | ||
| cmd: sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u {{ ansible_user }} --hp /home/{{ ansible_user }} |
There was a problem hiding this comment.
As per our contribution guidelines, we want to use long version options for readability :)
There was a problem hiding this comment.
I thought it was only for documentation
There was a problem hiding this comment.
In your opinion, what maximises code maintainability?
There was a problem hiding this comment.
I'm not saying it's a bad idea. I just thought that in the contribution guidelines when we were mentioning this was for documentation, so referencing them here didn’t seem entirely relevant. But yes, I’ll use the long version options :)
There was a problem hiding this comment.
Long version option is not available for --hp, so I updated only the first one.
Tested on the experimentation server.