blob: 2fb6e2e2138f901f4522cc12b8530f91153ae9d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
---
# file: roles/mellanox/tasks/main.yaml
- name: Mellanox Install - Install Distribution - Release - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
update_cache: true
tags:
- install-dependencies
- name: Mellanox Install - Check Presence of Mellanox Hardware
shell: "lspci | grep Mellanox | awk '{print $1}'"
register: mellanox_pcis
failed_when: no
changed_when: no
tags:
- install-mellanox
- name: Mellanox Install - 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
tags:
- install-mellanox
- name: Mellanox Install - 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
tags:
- install-mellanox
- name: Mellanox Install - Install 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:
- install-mellanox
- name: Mellanox Install - 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:
- install-mellanox
- name: Mellanox Install - FIX qemu-system removal
package:
name: "qemu-system"
state: latest
update_cache: true
tags:
- install-mellanox
|