From aecd18597d8cca0ced97f01609755d219ff41346 Mon Sep 17 00:00:00 2001 From: Sebastian Marcet Date: Fri, 13 Nov 2015 17:43:56 -0300 Subject: [PATCH] Added latest registry reference for node Puppet build fails without this. Change-Id: I7ef20e73e5bb9edee31de4887fc0bfec95fa0312 --- manifests/init.pp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index e051dd1..9d64f9c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -84,13 +84,22 @@ class openstackid ( require => Package['nodejs','curl'], } + # update node repo + exec { 'update-node-repo': + cwd => '/', + path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin', + logoutput => on_failure, + command => 'npm config set registry http://registry.npmjs.org/', + require => Package['npm'], + } + # install node version manager (https://www.npmjs.com/package/n) exec { 'install-node-version-manager': cwd => '/', path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin', logoutput => on_failure, command => 'npm install -g n', - require => Package['npm'], + require => Exec['update-node-repo'], } # install latest node js version @@ -99,7 +108,7 @@ class openstackid ( path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin', logoutput => on_failure, command => 'n stable', - require => Package['npm'], + require => Exec['install-node-version-manager'], } # install bower @@ -108,7 +117,7 @@ class openstackid ( path => '/usr/bin:/bin:/usr/local/bin:/usr/lib/node_modules/npm/bin', logoutput => on_failure, command => 'npm install -g bower', - require => Package['npm'], + require => Exec['install-latest-nodejs'], } group { 'openstackid':