Forge Home

nvm

Module to manage multiple nodejs versions per user using nvm

11,856 downloads

11,504 latest version

2.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.1 (latest)
  • 1.0.0
  • 0.1.0
released Oct 1st 2015
This version is compatible with:
  • Puppet Enterprise 3.2.x
  • Puppet 3.x
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'barnaclebob-nvm', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add barnaclebob-nvm
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install barnaclebob-nvm --version 1.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

barnaclebob/nvm — version 1.0.1 Oct 1st 2015

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with nvm
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module will install nvm and use it to install nodejs versions on a per user basis. This allows you to have multiple nvm installations per system such as using one user/nvm install per application running.

Usage

This module requires the user you want to install nvm for to already exist.

user{'bob':
  ensure     => present,
  managehome => true,
}

nvm{'bob':
  versions        => ["10.40", "stable", "12.6"]
  default_version => "stable"
}

Reference

Public Defines

Private defines

Define: nvm

Manages nvm for specified user.

Parameters (all optional)
  • versions: Specifies the versions of nodejs to install for this user. Valid options: an array of strings. Default: ['stable'].

  • default_version: Specifies the default version of nodejs that nvm will use. Valid options: a string from the versions parameter. Default: ['stable'].

  • nvm_version: Specifies the version of nvm to install. Valid options: a string. Default: '0.26.1'.

Limitations

Tested on:

  • Ubuntu 12.04
  • Ubuntu 14.04
  • Debian 6
  • Debian 7
  • Centos 6
  • Centos 7