Permalink
Browse files

* Adding node installed fact

* Removing include in npm
* Adding creates in make_npm
  • Loading branch information...
1 parent 689daee commit 2a7ee8dd2a849e98f6a310dc338315d746178be8 @narkisr narkisr committed Jun 4, 2011
Showing with 10 additions and 4 deletions.
  1. +7 −0 lib/facter/node_installed.rb
  2. +3 −0 manifests/init.pp
  3. +0 −4 manifests/npm.pp
@@ -0,0 +1,7 @@
+Facter.add("node_installed") do
+ node_binary = "/opt/node/bin/node"
+
+ setcode do
+ File.exists? node_binary
+ end
+end
View
@@ -1,5 +1,7 @@
class nodejs($user) {
+ class {"nodejs::npm": user => $user}
+
$node_ver = "v0.4.7"
$node_tar = "node-$node_ver.tar.gz"
@@ -43,6 +45,7 @@
cwd => "/tmp/node-$node_ver",
require => Exec["configure_node"],
timeout => 0,
+ creates => "/tmp/node-$node_ver/tools/js2c.pyc",
path => ["/usr/bin/","/bin/"],
}
View
@@ -1,9 +1,5 @@
-
class nodejs::npm($user) {
- include nodejs
-
-
$npm_path = "/opt/node/lib/npm"
package { "git":

0 comments on commit 2a7ee8d

Please sign in to comment.