stephdewit.nvm
nvm
This guide helps you install nvm (Node Version Manager) and Node.js.
Requirements
You need the following tools installed: git, curl, build-essential, libssl-dev. This role will take care of installing them.
Role Variables
nvm_version: The version of nvm to install, can be a specific version orHEAD,master, orlatest. Default is0.39.7.nvm_node_version: The version of Node.js to install, can be a specific version like12.16.0orlts/latest. Default is20.14.0.nvm_install_path: The folder path where nvm will be installed. It can be an absolute or relative path. Default is~/.nvm.nvm_shell_init_file: The Shell initialization file to add nvm to. Default is~/.profile.nvm_force_install: Boolean. If set to true, it will force reinstall nvm from git, useful if you changed files innvm_install_path. Default isfalse.nvm_install_deps: Boolean. If set to false, it skips installing dependencies, allowing it to run as a non-root user. Default istrue.
Dependencies
There are no additional dependencies.
Example Playbook
Here's how to use this in a playbook:
- hosts: servers
roles:
- role: stephdewit.nvm
nvm_version: 0.4.0
nvm_node_version: 0.10
To always install the latest version:
- hosts: servers
roles:
- role: stephdewit.nvm
nvm_version: 'latest'
nvm_node_version: 'latest'
If you are running the playbook under a different user, set the NVM_DIR environment variable with an absolute path:
- hosts: servers
roles:
- role: stephdewit.nvm
become: yes
become_user: vagrant
environment:
NVM_DIR: /home/vagrant/.nvm
License
This project is licensed under the BSD License.
Author Information
- Jarno Keskikangas
- Stéphane de Wit
Installa
ansible-galaxy install stephdewit.nvmLicenza
Unknown
Download
33.6k
Proprietario
