From 19c7b9c24e12b0e3300e8a42aacf874e1f185201 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 17 Sep 2024 01:42:06 -0700 Subject: [PATCH] install nodejs and npm packages properly in npm ansible --- .../ansible/roles/setup_lib_npm/tasks/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/archivebox/builtin_plugins/ansible/roles/setup_lib_npm/tasks/main.yml b/archivebox/builtin_plugins/ansible/roles/setup_lib_npm/tasks/main.yml index b11bd915..9f2e0a02 100755 --- a/archivebox/builtin_plugins/ansible/roles/setup_lib_npm/tasks/main.yml +++ b/archivebox/builtin_plugins/ansible/roles/setup_lib_npm/tasks/main.yml @@ -8,9 +8,14 @@ - '{{LIB_DIR_NPM_BIN}}' - '{{LIB_DIR_BIN}}' -- name: "Install system packages: [node, npm]" +- name: "Install system packages: node" 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" - name: Load NPM and Node binaries