Puppet Class: nodejsenv

Defined in:
manifests/init.pp

Overview

Configure nodejs environment for system

Parameters:

  • versions (Any) (defaults to: [])
  • default (Any)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'manifests/init.pp', line 2

class nodejsenv(
  $versions = [],
  $default,
) {
  $modules = hiera_array('nodejsenv::modules', [])

  include nodejs

  nodejs::version { $versions: }

  class { 'nodejs::global':
    version => $default
  }

  $module.each |$module| {
    npm_module { "${module} for all nodes":
      module       => $module,
      node_version => '*'
    }
  }
}