Change netcat pkg to netcat-traditional on Deb 93/73493/3 master
authorEric Ball <eball@linuxfoundation.org>
Tue, 3 Jun 2025 19:03:22 +0000 (12:03 -0700)
committerEric Ball <eball@linuxfoundation.org>
Thu, 5 Jun 2025 01:23:43 +0000 (18:23 -0700)
Newer versions of Ubuntu no longer have the "netcat" package, but all
versions from 18.04-24.04 have "netcat-traditional" available to
install the netcat binary.

This also includes fixes for molecule testing, which was no longer
working with the latest version of ansible/molecule.

Change-Id: I298c18e69530736a3f67a582e0df48631c55d705
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
molecule/default/molecule.yml
tasks/main.yml
tasks/pkg-names-Debian.yaml
vars/Debian.yaml

index ece185b..0353568 100644 (file)
@@ -4,19 +4,20 @@ dependency:
 driver:
   name: docker
 platforms:
-  - name: centos7
-    image: centos:7
-  - name: centos8
-    image: quay.io/centos/centos:stream8
-  - name: ubuntu1804
-    image: ubuntu:18.04
+  - name: centos7
+    image: centos:7
+  - name: centos8
+    image: quay.io/centos/centos:stream8
+  - name: ubuntu1804
+    image: ubuntu:18.04
   - name: ubuntu2004
     image: ubuntu:20.04
   - name: ubuntu2204
     image: ubuntu:22.04
+  - name: ubuntu2404
+    image: ubuntu:24.04
 provisioner:
   name: ansible
-scenario:
-  name: default
-verifier:
-  name: testinfra
+  # Fix for role path finding in latest molecule versions (~25.4.0)
+  env:
+    ANSIBLE_ROLES_PATH: ../../../
index 225be90..27238ad 100644 (file)
   when: ansible_os_family == 'RedHat'
   become: true
 
+- name: Install pre-packages on Debian
+  # These packages must be installed before others on Ubuntu 24.04+
+  ansible.builtin.package:
+    name:
+      - apt-utils
+      - pcp
+    state: present
+  when:
+    - ansible_facts['distribution'] == 'Ubuntu'
+    - ansible_distribution_major_version | int >= 24
+  become: true
+
 - name: Install LF Recommended Tools on Debian
   # Note: apt module requires state: 'fixed' not in dnf or yum modules
   ansible.builtin.package:
@@ -66,7 +78,7 @@
 - name: Add NodeSource repository/NodeJS
   vars:
     # Sets the packaged/baseline version of NodeJS
-    nodejs_version: "16.x"
+    nodejs_version: "22.x"
   block:
     - name: Add NodeSource repository/NodeJS under RedHat/CentOS
       become: true
       block:
         - name: Import the NodeSource GPG key into apt
           ansible.builtin.apt_key:
-            url: "https://keyserver.ubuntu.com/pks/lookup?\
-                  op=get&fingerprint=on&search=0x1655A0AB68576280"
-            id: "68576280"
+            url: "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key"
             state: present
 
         - name: Add NodeSource deb repository
           ansible.builtin.apt_repository:
             repo: "deb https://deb.nodesource.com/node_{{ nodejs_version }} \
-                   {{ ansible_distribution_release }} main"
+                   nodistro main"
             state: present
 
         - name: Add NodeSource deb-src repository
           ansible.builtin.apt_repository:
             repo: "deb-src \
                    https://deb.nodesource.com/node_{{ nodejs_version }} \
-                   {{ ansible_distribution_release }} main"
+                   nodistro main"
             state: present
 
         - name: Install Node.js
index 87db4a1..94b465c 100644 (file)
@@ -1,6 +1,6 @@
 ---
 pkg_gnu_parallel: parallel
-pkg_netcat: netcat
+pkg_netcat: netcat-traditional
 pkg_perl_digest_sha: libdigest-sha-perl
 pkg_perl_extutils_makemaker: libextutils-makemaker-cpanfile-perl
 pkg_perl_xml_xpath: libxml-xpath-perl
index bd84e22..dc82bcf 100644 (file)
@@ -7,7 +7,7 @@ lf_recommended_tools_packages_distro:
   - libextutils-makemaker-cpanfile-perl
   - libxml-xpath-perl
   - llvm
-  - netcat
+  - netcat-traditional
   - parallel
   - tk-dev
   - wget