Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 # == Type: nodejs::package | |
2 # | |
3 # Manage nodejs packages. | |
4 # | |
5 # === Parameters: | |
6 # | |
7 # [*options*] | |
8 # A list of zero or more options to install the package. | |
9 # | |
10 define nodejs::package ( | |
mathias
2017/07/09 07:26:50
Shouldn't there be some $ensure parameter in order
| |
11 $options = [], | |
12 ) { | |
13 | |
14 $install_command = [ | |
15 "npm", "install", | |
16 $options, | |
17 $title, | |
18 ] | |
19 | |
20 exec {"install_$title": | |
21 path => ["/usr/bin"], | |
22 command => shellquote($install_command), | |
23 require => Package['nodejs'], | |
24 onlyif => "test ! -x /usr/bin/${title}", | |
mathias
2017/07/09 07:26:50
Please use the 'creates' parameter instead.
| |
25 } | |
26 } | |
OLD | NEW |