community / community.general / 8.5.0 / module / pnpm Manage node.js packages with pnpm | "added in version" 7.4.0 of community.general" Authors: Aritra Sen (@aretrosen), Chris Hoffman (@chrishoffman), creator of NPM Ansible modulecommunity.general.pnpm (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Manage node.js packages with the L(pnpm package manager, https://pnpm.io/).
- name: Install "tailwindcss" node.js package. community.general.pnpm: name: tailwindcss path: /app/location
- name: Install "tailwindcss" node.js package on version 3.3.2 community.general.pnpm: name: tailwindcss version: 3.3.2 path: /app/location
- name: Install "tailwindcss" node.js package globally. community.general.pnpm: name: tailwindcss global: true
- name: Install "tailwindcss" node.js package as dev dependency. community.general.pnpm: name: tailwindcss path: /app/location dev: true
- name: Install "tailwindcss" node.js package as optional dependency. community.general.pnpm: name: tailwindcss path: /app/location optional: true
- name: Install "tailwindcss" node.js package version 0.1.3 as tailwind-1 community.general.pnpm: name: tailwindcss alias: tailwind-1 version: 0.1.3 path: /app/location
- name: Remove the globally-installed package "tailwindcss". community.general.pnpm: name: tailwindcss global: true state: absent
- name: Install packages based on package.json. community.general.pnpm: path: /app/location
- name: Update all packages in package.json to their latest version. community.general.pnpm: path: /app/location state: latest
dev: default: false description: - Install dependencies in development mode. - Pnpm will ignore any regular dependencies in C(package.json). required: false type: bool name: description: - The name of a node.js library to install. - All packages in package.json are installed if not provided. required: false type: str path: description: - The base path to install the node.js libraries. required: false type: path alias: description: - Alias of the node.js library. required: false type: str state: choices: - present - absent - latest default: present description: - Installation state of the named node.js library. - If V(absent) is selected, a name option must be provided. required: false type: str global: default: false description: - Install the node.js library globally. required: false type: bool version: description: - The version of the library to be installed, in semver format. required: false type: str optional: default: false description: - Install dependencies in optional mode. required: false type: bool executable: description: - The executable location for pnpm. - The default location it searches for is E(PATH), fails if not set. required: false type: path production: default: false description: - Install dependencies in production mode. - Pnpm will ignore any dependencies under C(devDependencies) in package.json. required: false type: bool no_optional: default: false description: - Do not install optional packages, equivalent to C(--no-optional). required: false type: bool ignore_scripts: default: false description: - Use the C(--ignore-scripts) flag when installing. required: false type: bool