robertdebock.npm
Ansible Role npm
This role helps you install npm on your system.
| GitHub | GitLab | Downloads | Version |
|---|---|---|---|
Example Playbook
The following playbook is an example to use this role. It is tested whenever there is a change.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.npm
Before running this, the system should be prepared using the following tasks:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
For more detailed guidance, you can refer to this full explanation.
Role Variables
Default settings for the variables can be found in the following file:
---
# defaults file for npm
npm_registry: "https://registry.npmjs.org/"
Requirements
Make sure to install the required pip packages listed in requirements.txt.
State of Used Roles
The roles below are used to prepare your system. You can choose different methods if you wish.
| Requirement | GitHub | GitLab |
|---|---|---|
| robertdebock.bootstrap | ||
| robertdebock.ca_certificates | ||
| robertdebock.epel |
Context
This role works well with many other related roles. Check out their documentation for more information.
Here is a visual of related roles:

Compatibility
This role is tested on various container images. Here are the tested ones:
| Container | Tags |
|---|---|
| Alpine | all |
| Amazon | Candidate |
| EL | 9 |
| Debian | bullseye |
| Fedora | all |
| Ubuntu | all |
You’ll need at least Ansible version 2.12. Testing has been done against older versions as well.
If you encounter any problems, please report them on GitHub.
License
This role is licensed under Apache-2.0.
Author Information
Created by robertdebock.
Please consider supporting me.
ansible-galaxy install robertdebock.npm