Added nodejs module
This commit is contained in:
parent
1d1d0845cb
commit
0b171dfb28
1 changed files with 22 additions and 0 deletions
22
nodejs/manifests/init.pp
Normal file
22
nodejs/manifests/init.pp
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Install node.js.
|
||||||
|
#
|
||||||
|
class nodejs {
|
||||||
|
|
||||||
|
case $::operatingsystem {
|
||||||
|
"centos": {
|
||||||
|
yum::repo { "nodejs":
|
||||||
|
mirrorlist => "http://nodejs.tchol.org/mirrors/nodejs-stable-el\$releasever",
|
||||||
|
gpgkey => "http://nodejs.tchol.org/stable/RPM-GPG-KEY-tchol",
|
||||||
|
}
|
||||||
|
|
||||||
|
package { [ "nodejs", "nodejs-compat-symlinks", "npm" ]:
|
||||||
|
ensure => installed,
|
||||||
|
require => Yum::Repo["nodejs"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("nodejs not supported on ${::operatingsystem}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue