install nodejs and npm packages properly in npm ansible

This commit is contained in:
Nick Sweeting 2024-09-17 01:42:06 -07:00
parent 7ab1a0b873
commit 19c7b9c24e
No known key found for this signature in database

View file

@ -8,9 +8,14 @@
- '{{LIB_DIR_NPM_BIN}}' - '{{LIB_DIR_NPM_BIN}}'
- '{{LIB_DIR_BIN}}' - '{{LIB_DIR_BIN}}'
- name: "Install system packages: [node, npm]" - name: "Install system packages: node"
ansible.builtin.package: ansible.builtin.package:
name: "node" name: "{{ (ansible_facts['os_family']|lower == 'debian') | ternary('nodejs', 'node') }}"
state: "present"
- name: "Install system packages: npm"
ansible.builtin.package:
name: "npm"
state: "present" state: "present"
- name: Load NPM and Node binaries - name: Load NPM and Node binaries