

Installing Latest Node.JS And NPM Modules With Puppet
source link: https://blog.jakubholy.net/2013/06/21/installing-latest-node-js-and-npm-modules-with-puppet/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Installing Latest Node.JS And NPM Modules With Puppet
- Install the puppetlabs-apt module
- Add ppa:chris-lea/node.js to apt
- Install nodejs
- Steal the npm provider from the puppetlabs-nodejs module
- Install a npm module
Stealing the npm package provider:
cd your/puppet/modules/directory
mkdir -p npm-provider/lib/puppet/provider/package
cd npm-provider/lib/puppet/provider/package
wget https://raw.github.com/puppetlabs/puppetlabs-nodejs/master/lib/puppet/provider/package/npm.rb
Puppet Code:
class prepare {
class { 'apt': }
apt::ppa { 'ppa:chris-lea/node.js': }
}
include prepare
package {'nodejs': ensure => present, require => Class['prepare'],}
package {'grunt-cli':
ensure => present,
provider => 'npm',
require => Package['nodejs'],
}
Are you benefitting from my writing? Consider buying me a coffee or supporting my work via GitHub Sponsors. Thank you! You can also book me for a mentoring / pair-programming session via Codementor or (cheaper) email.
Allow me to write to you!
Let's get in touch! I will occasionally send you a short email with a few links to interesting stuff I found and with summaries of my new blog posts. Max 1-2 emails per month. I read and answer to all replies.
Recommend
-
9
If you maintain more than one Puppet module, you’ve probably spent some time aligning changes in your general setup by hand – rspec helpers, Gemfile, Rakefile, your travis config, etc. Once you have a third or a fourth module, you find that d...
-
11
RSpec tests for your Puppet manifests & modules Table of Contents Installation gem install rspec-puppet Note for ruby 1.8 users: while rspec-puppet itself supports ruby 1....
-
3
Installing Puppet ServerOpen Source Puppet — 7.1 (latest)We've updated our documentation to remove harmful terminology.Find out more.
-
5
Standard Self-documenting Puppet modules with puppet-strings Documentation is hard. Anyone who has been in IT long enough will have tales of chasing their tails beca...
-
6
...
-
6
Announcing Puppet Compliance Enforcement Modulesby Alex Hin|29 September 2021Announcing Compliance Enforcement ModulesHi, it’s me... Back...
-
8
by Claire McDyre|6 October 2021Compliance Enforcement ModulesSince we launched Puppet Comply last year, we’ve b...
-
7
homeblogupdating puppet modules for deferred functionsUpdating Puppet modules for deferred functionsby
-
7
homeblogget your time back by getting rid of unused modules with dropsondeGet your time back by getting rid of unused m...
-
7
The Node.js ecosystem is a vast landscape, and one of the most important parts of that ecosystem is its various modules. Installing these modules is an easy process, thanks to the npm registry. It is easy to download packages, create your own mod...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK