- Debian: 10 through latest
- RHEL: 9 through latest
- Ubuntu: Use the Debian-family play
- name: Install Node.js toolchain on Debian family
hosts: javascript_debian
become: true
tasks:
- name: Install Node.js and npm
ansible.builtin.apt:
update_cache: true
name:
- nodejs
- npm
state: present
- name: Install common JS CLI tools
community.general.npm:
name: "{{ item }}"
global: true
loop:
- yarn
- pnpm
- name: Install Node.js toolchain on RHEL family
hosts: javascript_rhel
become: true
tasks:
- name: Install Node.js and npm
ansible.builtin.dnf:
name:
- nodejs
- npm
state: present
- Add Ubuntu hosts to
javascript_debian.