blob: 7f47981378fc70c161a159c25b9c1a10f638bcb8 (
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
|
---
# file: roles/mellanox/tasks/main.yaml
- name: Inst - Update Package Cache (APT)
apt:
update_cache: true
cache_valid_time: 3600
when:
- ansible_distribution|lower == 'ubuntu'
tags:
- mellanox-inst-drivers
- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: "latest"
tags:
- mellanox-inst-drivers
- 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-drivers
- name: Inst - Get Mellanox CX-5 OFED driver versions
set_fact:
ofed: "{{ mellanox_cx5_compatibility_matrix[mellanox_cx5_matrix]['ofed'] }}"
when: >
mellanox_pcis.stdout_lines | length > 0 and
mellanox_cx5_matrix is defined
tags:
- mellanox-inst-drivers
- 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-drivers
|