Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (23 sloc) 0.807 kB
class nvm ($node_version) {
Exec {
path => ['/usr/local/bin','/usr/local/sbin','/usr/bin/','/usr/sbin','/bin','/sbin'],
}
exec { "set-node-version":
command => "bash -c \"source /home/vagrant/nvm/nvm.sh && nvm alias default ${node_version}\"",
require => Exec["install-node"],
}
exec { "install-node":
command => "bash -c \"source /home/vagrant/nvm/nvm.sh && nvm install ${node_version}\"",
require => Exec["clone-nvm"],
}
exec { "clone-nvm":
command => "git clone git://github.com/creationix/nvm.git /home/vagrant/nvm",
user => "vagrant",
group => "vagrant",
creates => "/home/vagrant/nvm/nvm.sh",
require => Package["git-core"],
}
exec { "source-nvm":
command => "echo 'source /home/vagrant/nvm/nvm.sh' >> /home/vagrant/.bashrc",
}
}
Jump to Line
Something went wrong with that request. Please try again.