From 53b991073c97aac5c25453cd7773c4db06703345 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Tue, 25 Mar 2025 14:47:45 +0000 Subject: [PATCH] Fix sriov MFT dependency installation for Debian --- ...iov-mlxconfig-support-debian-aa74b73b1e3b97e4.yaml | 5 +++++ roles/sriov/defaults/main.yml | 11 ++++++++++- roles/sriov/tasks/mlxconfig.yml | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/sriov-mlxconfig-support-debian-aa74b73b1e3b97e4.yaml diff --git a/releasenotes/notes/sriov-mlxconfig-support-debian-aa74b73b1e3b97e4.yaml b/releasenotes/notes/sriov-mlxconfig-support-debian-aa74b73b1e3b97e4.yaml new file mode 100644 index 0000000..5943453 --- /dev/null +++ b/releasenotes/notes/sriov-mlxconfig-support-debian-aa74b73b1e3b97e4.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Updates the sriov role to correctly install MFT dependencies when on a + Debian system. diff --git a/roles/sriov/defaults/main.yml b/roles/sriov/defaults/main.yml index 26cbc0d..802fa1e 100644 --- a/roles/sriov/defaults/main.yml +++ b/roles/sriov/defaults/main.yml @@ -7,7 +7,7 @@ sriov_mft_url: https://www.mellanox.com/downloads/MFT/mft-4.23.0-104-x86_64-rpm. sriov_mft_tarball: "{{ sriov_mft_url | urlsplit('path') | basename }}" -sriov_os_pkgs: +sriov_os_pkgs_rpm: - gcc - rpm-build # -E- Could not find lspci, you may need to install "pciutils" package @@ -17,6 +17,15 @@ sriov_os_pkgs: - kernel-devel - make +sriov_os_pkgs_deb: + - gcc + # -E- Could not find lspci, you may need to install "pciutils" package + - pciutils + # NOTE(wszumski): Assumes running latest kernel. We could include package version with + # output of uname -r, but the packages aren't always available. + - linux-headers-generic + - make + sriov_restart_handler: reboot sriov_numvfs: 8 diff --git a/roles/sriov/tasks/mlxconfig.yml b/roles/sriov/tasks/mlxconfig.yml index 32d2581..1131a61 100644 --- a/roles/sriov/tasks/mlxconfig.yml +++ b/roles/sriov/tasks/mlxconfig.yml @@ -1,7 +1,7 @@ --- - name: Install MFT dependencies - ansible.builtin.yum: - name: "{{ sriov_os_pkgs }}" + ansible.builtin.package: + name: "{{ sriov_os_pkgs_rpm if ansible_facts.os_family == 'RedHat' else sriov_os_pkgs_deb }}" become: true when: sriov_install_enabled