aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/intel/tasks/main.yaml
blob: 80c8d3899898e617ef3e257350bf8a29dbc74db0 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
# file: tasks/main.yaml

- name: Update Package Cache (APT)
  ansible.builtin.apt:
    update_cache: true
    cache_valid_time: 3600
  when:
    - ansible_distribution|lower == 'ubuntu'
  tags:
    - intel-inst-drivers

- name: Install Prerequisites
  ansible.builtin.package:
    name: "{{ packages | flatten(levels=1) }}"
    state: latest
  tags:
    - intel-inst-drivers

- name: Check Presence of Intel Ethernet 700 Series
  ansible.builtin.shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572; lspci -d 8086:158a; lspci -d 8086:158b"
  register: intel_700_pcis
  failed_when: false
  changed_when: false
  tags:
    - intel-inst-drivers

- name: Check Presence of Intel Ethernet 800 Series
  ansible.builtin.shell: "lspci -d 8086:1592; lspci -d 8086:1891"
  register: intel_800_pcis
  failed_when: false
  changed_when: false
  tags:
    - intel-inst-drivers

- name: Check Presence of Intel DSA
  ansible.builtin.shell: "lspci -d 8086:0b25"
  register: intel_dsa_pcis
  failed_when: false
  changed_when: false
  tags:
    - intel-inst-drivers

- name: Get Intel Ethernet 700 Series driver versions
  ansible.builtin.set_fact:
    i40e: "{{ intel_700_compatibility_matrix[intel_700_matrix]['i40e'] }}"
    iavf: "{{ intel_700_compatibility_matrix[intel_700_matrix]['iavf'] }}"
    nvm: "{{ intel_700_compatibility_matrix[intel_700_matrix]['nvm'] }}"
  when: >
    intel_700_matrix is defined
  tags:
    - intel-inst-drivers

- name: Get Intel Ethernet 800 Series driver versions
  ansible.builtin.set_fact:
    ice: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ice'] }}"
    ddp: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ddp'] }}"
    iavf: "{{ intel_800_compatibility_matrix[intel_800_matrix]['iavf'] }}"
    nvm: "{{ intel_800_compatibility_matrix[intel_800_matrix]['nvm'] }}"
  when: >
    intel_800_matrix is defined
  tags:
    - intel-inst-drivers

- name: Get Intel DSA driver versions
  ansible.builtin.set_fact:
    dsa: "{{ intel_dsa_compatibility_matrix['dsa'] }}"
  when: >
    intel_dsa_matrix is defined
  tags:
    - intel-inst-drivers

- name: Get Intel QAT driver versions
  ansible.builtin.set_fact:
    qat: "{{ intel_qat_compatibility_matrix['qat'] }}"
  when: >
    intel_qat_matrix is defined
  tags:
    - intel-inst-drivers

- name: Driver Intel Ethernet 700 Series
  import_tasks: i40e.yaml
  when: >
    intel_700_pcis.stdout_lines | length > 0 and
    intel_700_matrix is defined
  tags:
    - intel-inst-drivers

- name: Driver Intel Ethernet 800 Series
  import_tasks: ice.yaml
  when: >
    intel_800_pcis.stdout_lines | length > 0 and
    intel_800_matrix is defined
  tags:
    - intel-inst-drivers

- name: Driver Intel iAVF
  import_tasks: iavf.yaml
  when: >
    (intel_700_pcis.stdout_lines | length > 0 and
    intel_700_matrix is defined) or
    (intel_800_pcis.stdout_lines | length > 0 and
    intel_800_matrix is defined)
  tags:
    - intel-inst-drivers

- name: Driver Intel DSA
  import_tasks: dsa.yaml
  when: >
    intel_dsa_pcis.stdout_lines | length > 0 and
    intel_dsa_matrix is defined
  tags:
    - intel-inst-drivers

- name: Driver Intel QAT
  import_tasks: qat.yaml
  when: >
    intel_qat_matrix is defined
  tags:
    - intel-inst-drivers