yarn – Manage node.js packages with Yarn¶
New in version 2.6.
Synopsis¶
Manage node.js packages with the Yarn package manager (https://yarnpkg.com/)
Requirements¶
The below requirements are needed on the host that executes this module.
Yarn installed in bin path (typically /usr/local/bin)
Parameters¶
Examples¶
- name: Install "imagemin" node.js package.
yarn:
name: imagemin
path: /app/location
- name: Install "imagemin" node.js package on version 5.3.1
yarn:
name: imagemin
version: '5.3.1'
path: /app/location
- name: Install "imagemin" node.js package globally.
yarn:
name: imagemin
global: yes
- name: Remove the globally-installed package "imagemin".
yarn:
name: imagemin
global: yes
state: absent
- name: Install "imagemin" node.js package from custom registry.
yarn:
name: imagemin
registry: 'http://registry.mysite.com'
- name: Install packages based on package.json.
yarn:
path: /app/location
- name: Update all packages in package.json to their latest version.
yarn:
path: /app/location
state: latest
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
David Gunter (@verkaufer)
Chris Hoffman (@chrishoffman), creator of NPM Ansible module)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.