Skip to content
Install NVM on macOS or Ubuntu developer machines
Shell Dockerfile Makefile JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
defaults fix: nvm v0.35.1 Nov 3, 2019
meta
tasks
tests fix: remove Dockerfile labels Nov 3, 2019
vars
.ansible-lint
.commitlintrc.js
.editorconfig
.gitattributes style: bash scripts Mar 3, 2019
.gitignore
.markdownlint.json
.pre-commit-config.yaml
.travis.yml
.yamllint
CHANGELOG.md docs: version 1.4.1 Nov 3, 2019
LICENSE update LICENSE file Jan 13, 2019
Makefile
README.md
update-release

README.md

markosamuli.nvm

Ansible Quality Score Ansible Role GitHub release License

Branch Status
master Build Status
develop Build Status

Ansible role to install Node.js with NVM on macOS or Ubuntu Developer machines.

The role doesn't use Homebrew for installing nvm on macOS as it's not a support method in the upstream repository.

Git and cURL are installed if missing on the target system.

Role Variables

# We're installing stable Node.js version by default
nvm_default_node_version: stable
nvm_node_versions:
  - "{{ nvm_default_node_version }}"

# Initialize shell profile scripts
nvm_init_shell: yes

# Define the shell profile scripts to initialiaze
nvm_shell_profile_scripts:
  - .bashrc
  - .zshrc

Example Playbook

- hosts: localhost
  connection: local
  roles:
      - { role: markosamuli.nvm }

Linux distribution support

I've used this for installing NVM and Node.js on Pengwin distribution on WSL.

The configuration variables for bash and zsh profiles are missing for untested distributions.

Changes

License

Author Information

You can’t perform that action at this time.