stephdewit.nvm

nvm

Downloads Continuous Integration Status

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 or HEAD, master, or latest. Default is 0.39.7.
  • nvm_node_version: The version of Node.js to install, can be a specific version like 12.16.0 or lts / latest. Default is 20.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 in nvm_install_path. Default is false.
  • nvm_install_deps: Boolean. If set to false, it skips installing dependencies, allowing it to run as a non-root user. Default is true.

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

Informazioni sul progetto

Install nvm and Node.js.

Installa
ansible-galaxy install stephdewit.nvm
Licenza
Unknown
Download
27.7k
Proprietario