Open TechDufus opened 9 months ago
I marked as draft, because if merged as-is, this will require a full node and nvm purge in order to update node (which will need to reinstall nvm). If we break out the node install steps into it's own role node
, we can easily uninstall node and reinstall the desired version without having to reinstall nvm
itself.
I will work on breaking the current nvm
role into --> nvm
& node
roles.
TLDR: Create an update / upgrade path for nvm/node versions without borking nodes. This will allow upgrades / downgrades to the
nvm.node.version
provided in thevars.yml
file.This pull request includes changes to the roles and variables related to NVM, Node, Logrotate, PM2, and Watchdog. The most important changes include adding tasks to check and install NVM and Node, installing Logrotate, PM2, and Watchdog, and updating the Node version in the
vars.yml
file.Summary of changes:
roles/nvm/tasks/nvm-install.yml
: Added tasks to check if NVM and Node are installed, get the installed Node version, determine if a Node update is needed, install Logrotate, PM2, and Watchdog, and start PM2 after installation. [1] [2]roles/nvm/tasks/nvm-purge.yml
: Added tasks to purge Logrotate, PM2, and Watchdog with specific tags and elevated privileges.roles/pm2/tasks/pm2-stop.yml
: Added theignore_errors
option to theansible.builtin.shell
task to allow it to continue executing even if it encounters an error.vars.yml
: Updated the Node version from16.19.1
to20.9.0
to specify the desired version of Node to be installed.