Created
March 8, 2012 21:02
-
-
Save niallo/2003430 to your computer and use it in GitHub Desktop.
Puppet class recipe to install Node.JS & ZeroMQ on Ubuntu 10.04 LTS / Lucid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class nodejs { | |
Package { ensure => "installed" } | |
$pkglist = [ "python-software-properties" ] | |
package { $pkglist: } | |
$apt-base = "/etc/sources.list.d/chris-lea" | |
Exec { require => package["python-software-properties"] } | |
exec { "node-repo" : | |
command => "/usr/bin/add-apt-repository ppa:chris-lea/node.js", | |
creates => "${apt-base}/node.js-lucid.list", | |
} | |
exec { "zeromq-repo" : | |
command => "/usr/bin/add-apt-repository ppa:chris-lea/zeromq", | |
creates => "${apt-base}/zeromq-lucid.list", | |
} | |
exec { "libpgm-repo" : | |
command => "/usr/bin/add-apt-repository ppa:chris-lea/libpgm", | |
creates => "${apt-base}/libpgm-lucid.list" | |
} | |
$required-execs = [ "node-repo", "zeromq-repo", "libpgm-repo" ] | |
exec { "apt-ready" : | |
command => "/usr/bin/apt-get update", | |
require => Exec[$required-execs] | |
} | |
package { [ "nodejs", "nodejs-dev", "libzmq-dev" ] : | |
require => Exec["apt-ready"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
Notes to help others running 10.04:
$apt-base = "/etc/apt/sources.list.d/chris-lea"
, which matched my fresh 10.04 clone.node-repo
, trycreates => "${apt-base}-node.js-lucid.list"
to add it only if it's not there.