puppet-npm-simple:node.js npm 模块的 Puppet 包提供程序

  • A5_213564
  • 3.4KB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-05-05 17:38
puppet-npm-simple - npm 包的 Puppet 提供者 npm 还有其他包提供程序,但它们通常安装特定版本的 node.js(仅限于包系统或旧版本)。 npm-simple 不安装 node.js。 事实上,它适用于在非标准位置安装了多个版本的 node.js 的系统。 由您来安装 node 并将其放在您的 PATH 中或告诉 npm-simple 在哪里找到它。 可以在上找到此代码的最新版本。 安装 只需将此包放在您的 Puppet 模块路径中,例如: # cd /etc/puppet/modules # git clone http://github.com/rlister/puppet-npm-simple 用法 默认情况下,npm-simple 将使用您路径中的 node 并进行全局 npm 安装: package { "underscore":
puppet-npm-simple - Puppet provider for npm packages ==================================================== There are other package providers for npm, but they generally install a specific version of node.js (either limited to a package system or an old version). npm-simple does not install node.js. In fact, it is suitable for systems where you have multiple versions of node.js installed in non-standard locations. It is up to you to install node and either have it in your PATH or tell npm-simple where to find it. Latest version of this code may be found on [github](http://github.com/rlister/puppet-npm-simple). Installation ------------ Just drop this package in your Puppet modulepath, e.g.: # cd /etc/puppet/modules # git clone http://github.com/rlister/puppet-npm-simple Usage ----- By default, npm-simple will use node from your path and do a global npm installation: package { "underscore": provider => npm, ensure => installed, } As with other package providers, you can ensure 'latest', 'absent', or specific versions. If you are using node from a location not in your path, set 'nodepath' option: package { "underscore": provider => npm, ensure => installed, install_options => { nodepath => "/opt/node-v0.6.16/bin", } } To do a local install, in a specific project directory, set option 'global' to false, and give the directory as 'cwd': package { "underscore": provider => npm, ensure => installed, install_options => { nodepath => "/opt/node-v0.6.16/bin", global => false, cwd => '/u/apps/foobar', } } The provider does not impose any specific restrictions on user. It will run with same permissions as puppet, which is probably what you want. You are obviously limited by write permissions on the npm modules installation dir, whether global or local.