Install nvm and Node.js.
git, curl, build-essential, libssl-dev. Requirements are installed by the role.
nvm_versionnvm version tag, orHEAD. Defaults to0.35.2nvm_node_versionNode.js version. Defaults to12.16.0nvm_install_pathnvm folder path. Defaults to~/.nvmnvm_shell_init_fileThe Shell initialization file to add sourcing of NVM to. Defaults to~/.profile
No dependencies.
- hosts: servers
roles:
- role: stephdewit.nvm
nvm_version: 0.4.0
nvm_node_version: 0.10
When run with another user than the logged one, it may help to set NVM_DIR environment variable to an absolute path:
- hosts: servers
roles:
- role: stephdewit.nvm
become: yes
become_user: vagrant
environment:
NVM_DIR: /home/vagrant/.nvm
BSD
- Jarno Keskikangas
- Stéphane de Wit