Skip to content

GoToAssist/puppet-nodejs

 
 

Repository files navigation

nodejs Puppet Module for Boxen

Build Status

Using nodenv for nodejs version management, automates installation and configuration of nodejs versions.

Usage

# include short version aliases
nodejs::version { '0.10': }

# install any arbitrary nodejs version
nodejs::version { '0.10.1': }

# set the global nodejs version
class { 'nodejs::global': version => '0.10.1' }

# install some npm modules
nodejs::module { 'bower':
  node_version => '0.10'
}

# install a nodenv plugin
nodejs::plugin { 'nodenv-vars':
  ensure => 'master',
  source => 'OiNutter/nodenv-vars'
}

Hiera configuration

The following variables may be automatically overridden with Hiera:

---
# Version compile configuration, if not version is defined the default is false
# Yyou can define whether to compile from source or not based on long version
# and define short versions as a fallback if non long version is defined
"nodejs::version::compile":
  "0.10": false
  "0.4": true
  "0.6.20" : true

# Version aliases, commonly used to bless a specific version
# Use the "deeper" merge strategy, as with nodejs::version::env
"nodejs::version::alias":
  "0.10": "0.10.31"
  "0.8": "0.8.26"
  "0.6": "0.6.20"
  "0.4": "0.4.10"

It is required that you include ripienaar/puppet-module-data in your boxen project, as this module now ships with many pre-defined versions and aliases in the data/ directory. With this module included, those definitions will be automatically loaded, but can be overridden easily in your own hierarchy.

You can also use JSON if your Hiera is configured for that.

Required Puppet Modules

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 66.8%
  • Puppet 30.5%
  • Shell 2.7%