Installs n, nodejs and npm provider for Ubuntu.
git submodule add https://github.com/hstkk/puppet-n.git modules/n
- Install n
include n
- Install n, stable and unstable nodejs
class { 'n':
versions => ['stable', 'latest'],
}
- Select nodejs version
- Install npm packages
exec { "use-node-stable":
command => 'n stable',
require => Class['n'],
}
package { 'express':
provider => npm,
require => Exec['use-node-stable'],
}