From a5cefb5464e0dd8e4a0638165d2519da62043c78 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 17 Sep 2024 01:46:02 -0700 Subject: [PATCH] install nodesource first --- .../ansible/roles/setup_lib_npm/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 9f2e0a02..b69c2fc0 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,6 +8,19 @@ - '{{LIB_DIR_NPM_BIN}}' - '{{LIB_DIR_BIN}}' +- name: Install the gpg key for nodejs LTS + apt_key: + url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" + state: present + when: ansible_facts['os_family']|lower == 'debian' + +- name: Install the nodejs LTS repos + apt_repository: + repo: "deb https://deb.nodesource.com/node_22.x {{ ansible_facts['distribution_release'] }} main" + state: present + update_cache: yes + when: ansible_facts['os_family']|lower == 'debian' + - name: "Install system packages: node" ansible.builtin.package: name: "{{ (ansible_facts['os_family']|lower == 'debian') | ternary('nodejs', 'node') }}"