aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-05-10 10:57:43 +0200
committerPeter Mikus <pmikus@cisco.com>2022-05-10 10:09:11 +0000
commit9e5fff4c2f51f77f9bb44f09914e428a8e377597 (patch)
treedd7729a761572cb9925837aa547cc1be30982e92 /fdio.infra.ansible/roles/mellanox/tasks/main.yaml
parent89b26f0793d19434731e2d97f02939494369c739 (diff)
feat(infra): Mellanox compatibility Matrix
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Iec87340aed64dd72e5289bd13af27c177f92c466
Diffstat (limited to 'fdio.infra.ansible/roles/mellanox/tasks/main.yaml')
-rw-r--r--fdio.infra.ansible/roles/mellanox/tasks/main.yaml57
1 files changed, 16 insertions, 41 deletions
diff --git a/fdio.infra.ansible/roles/mellanox/tasks/main.yaml b/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
index 3cccdb7727..75964304ca 100644
--- a/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
@@ -8,60 +8,35 @@
when:
- ansible_distribution|lower == 'ubuntu'
tags:
- - mellanox-inst-prerequisites
+ - mellanox-inst-drivers
- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
- - mellanox-inst-prerequisites
+ - mellanox-inst-drivers
-- name: Inst - Check Presence of Mellanox Hardware
+- name: Inst - Check Presence of Mellanox CX-5
shell: "lspci | grep Mellanox | awk '{print $1}'"
register: mellanox_pcis
failed_when: false
changed_when: false
tags:
- - mellanox-inst
+ - mellanox-inst-drivers
-- name: Inst - Get OFED
- get_url:
- url: "http://content.mellanox.com/ofed/MLNX_OFED-{{ mellanox_version }}/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
- dest: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
- mode: 0644
- when: mellanox_pcis.stdout_lines | length > 0
+- name: Inst - Get Mellanox CX-5 OFED driver versions
+ set_fact:
+ ofed: "{{ mellanox_cx5_compatibility_matrix[mellanox_cx5_matrix]['ofed'] }}"
+ when: >
+ mellanox_pcis is defined
tags:
- - mellanox-inst
+ - mellanox-inst-drivers
-- name: Inst - Extract OFED
- unarchive:
- remote_src: true
- src: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
- dest: "/opt/"
- creates: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
- register: mellanox_firmware_extracted
- when: mellanox_pcis.stdout_lines | length > 0
+- name: Inst - Driver Mellanox CX-5
+ import_tasks: ofed.yaml
+ when: >
+ mellanox_pcis.stdout_lines | length > 0 and
+ mellanox_cx5_matrix is defined
tags:
- - mellanox-inst
-
-- name: Inst - OFED
- command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs"
- args:
- chdir: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
- when: mellanox_pcis.stdout_lines | length > 0 and mellanox_firmware_extracted
- tags:
- - mellanox-inst
-
-- name: Switch Infiniband to Ethernet
- command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2"
- with_items: "{{ mellanox_pcis.stdout_lines }}"
- tags:
- - mellanox-conf
-
-- name: FIX qemu-system removal
- package:
- name: "qemu-system"
- state: latest
- tags:
- - mellanox-inst
+ - mellanox-inst-drivers