Skip to content

Instantly share code, notes, and snippets.

@coop
Created May 14, 2012 09:00
Show Gist options
  • Select an option

  • Save coop/2692857 to your computer and use it in GitHub Desktop.

Select an option

Save coop/2692857 to your computer and use it in GitHub Desktop.
define nodejs::version($version) {
exec {
"Donwload ${version}":
command => "wget http://nodejs.org/dist/v${version}/node-v${version}.tar
cwd => "/tmp",
require => Package['curl'];
"Untar ${version}":
command => "tar -zxf node-v${version}",
cwd => "/tmp"
require => Exec["Download ${version}"];
"Configure, make and install ${version}":
command => "./configure && make && make install",
cwd => "/tmp/node-v${version}",
require => Exec["Untar ${version}"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment