Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Created December 19, 2013 15:28
Show Gist options
  • Save badsyntax/8040942 to your computer and use it in GitHub Desktop.
Save badsyntax/8040942 to your computer and use it in GitHub Desktop.
Puppet: Installing node.js via nvm
class nodejs {
exec { 'nvm-install':
command => '/usr/bin/curl https://raw.github.com/creationix/nvm/master/install.sh | /bin/sh',
creates => '/home/vagrant/.nvm',
user => 'vagrant',
environment => 'HOME=/home/vagrant',
require => Package['curl']
}
exec { 'node-install':
command => '/bin/bash -c "source /home/vagrant/.nvm/nvm.sh && nvm install 0.10.23 && nvm alias default 0.10.23"',
user => 'vagrant',
environment => 'HOME=/home/vagrant',
require => Exec['nvm-install']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment