diff --git a/nodejs/manifests/init.pp b/nodejs/manifests/init.pp new file mode 100644 index 0000000..dac9bca --- /dev/null +++ b/nodejs/manifests/init.pp @@ -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}") + } + } + +}