npm

Collection: community.general

Full Name: parallax.community.general.npm

Aliases: community.general.npm, npm

Synopsis

Manage Node.js packages with npm

Parameters

NameTypeRequiredDefaultDescription
namestringThe name of a node.js library to install
statestringpresentThe state of the node.js library (present, absent, latest)
globalboolfalseInstall the node.js library globally
pathstringThe base path where to install the node.js library
versionstringThe version to be installed
productionboolfalseInstall dependencies in production mode
registrystringThe registry to install modules from
executablestringnpmThe executable location for npm

Example

- name: Install the project's production dependencies
  npm:
    path: /srv/app
    production: true
    state: present