Puppet Class: nodejs::global

Defined in:
manifests/global.pp

Overview

Parameters:

  • version (Any) (defaults to: '0.10.36')


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'manifests/global.pp', line 7

class nodejs::global($version = '0.10.36') {
  require nodejs

  if $nodejs::provider == 'nodenv' {
    if $version != 'system' {
      ensure_resource('nodejs::version', $version)
      $require = Nodejs::Version[$version]
    } else {
      $require = undef
    }

    file { "${nodejs::nodenv::prefix}/version":
      ensure  => present,
      owner   => $nodejs::user,
      mode    => '0644',
      content => "${version}\n",
      require => $require,
    }
  }
}