goooseman.nvm
nvm
Install nvm and Node.js.
This fork uses Rosetta 2 NodeJS installation on Apple Silicon machines.
Requirements
git, curl, build-essential, libssl-dev. Requirements are installed by the role.
Role Variables
nvm_versionnvm version tag, orHEAD|master|latest. Defaults to0.39.7nvm_node_versionNode.js specific version12.16.0or uselts|latest. Defaults to20.14.0nvm_install_pathnvm folder path, support absolute and relative path. Defaults to~/.nvmnvm_shell_init_fileThe Shell initialization file to add sourcing of NVM to. Defaults to~/.profilenvm_force_installBoolean. Force reinstall nvm from git, for example if you change some files innvm_install_path. Defaults tofalsenvm_install_depsBoolean. Allow to skip dependencies setup and therefore run as a non-root user. Defaults totrue
Dependencies
No dependencies.
Example Playbook
- hosts: servers
roles:
- role: stephdewit.nvm
nvm_version: 0.4.0
nvm_node_version: 0.10
Install latest version always
- hosts: servers
roles:
- role: stephdewit.nvm
nvm_version: 'latest'
nvm_node_version: 'latest'
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
License
BSD
Author Information
- Jarno Keskikangas
- Stéphane de Wit
Install
ansible-galaxy install goooseman.nvmLicense
Unknown
Downloads
2.1k
Owner
A senior engineer experienced in building scalable projects from scratch, maintaining legacy ones and building teams.
