Created
December 19, 2013 15:28
-
-
Save badsyntax/8040942 to your computer and use it in GitHub Desktop.
Puppet: Installing node.js via nvm
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 { | |
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