Forge Home

nodejs

Nodejs & NPM Puppet Module

13,927,974 downloads

127,919 latest version

3.8 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

  • 999.999.999 (latest)
  • 0.8.0
  • 0.7.1
  • 0.7.0
  • 0.6.1
  • 0.6.0
  • 0.4.0
  • 0.3.0
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Aug 29th 2013
This module has been deprecated by its author since Sep 28th 2017.

The reason given was: This module has been moved to the care of Vox Pupuli where it is now being maintained and updated.

The author has suggested puppet-nodejs as its replacement.

Start using this module

Documentation

puppetlabs/nodejs — version 0.4.0 Aug 29th 2013

puppet-nodejs module

Overview

Install nodejs package and npm package provider for Debian, Ubuntu, Fedora, and RedHat.

Usage

class nodejs

Installs nodejs and npm per nodejs documentation.

  • dev_package: whether to install optional dev packages. dev packages not available on all platforms, default: false.

Example:

include nodejs

You may want to use apt::pin to pin package installation priority on sqeeze. See puppetlabs-apt for more information.

apt::pin { 'sid': priority => 100 }

npm package

Two types of npm packages are supported.

  • npm global packages are supported via ruby provider for puppet package type.
  • npm local packages are supported via puppet define type nodejs::npm.

For more information regarding global vs. local installation see nodejs blog

package

npm package provider is an extension of puppet package type which supports versionable and upgradeable. The package provider only handles global installation:

Example:

package { 'express':
  ensure   => latest,
  provider => 'npm',
}

package { 'mime':
  ensure   => '1.2.4',
  provider => 'npm',
}

nodejs::npm

nodejs::npm is suitable for local installation of npm packages:

nodejs::npm { '/opt/razor:express':
  ensure  => present,
  version => '2.5.9',
}

nodejs::npm title consists of filepath and package name seperate via ':', and support the following attributes:

  • ensure: present, absent.
  • version: package version (optional).
  • source: package source (optional).
  • install_opt: option flags invoked during installation such as --link (optional).
  • remove_opt: option flags invoked during removal (optional).

Supported Platforms

The module have been tested on the following operating systems. Testing and patches for other platforms are welcomed.

  • Debian Wheezy.
  • RedHat EL5.