style(ipsec): Unify mutiline strings
[csit.git] / fdio.infra.ansible / roles / intel / tasks / main.yaml
1 ---
2 # file: tasks/main.yaml
3
4 - name: Update Package Cache (APT)
5   ansible.builtin.apt:
6     update_cache: true
7     cache_valid_time: 3600
8   when:
9     - ansible_distribution|lower == 'ubuntu'
10   tags:
11     - intel-inst-drivers
12
13 - name: Install Prerequisites
14   ansible.builtin.package:
15     name: "{{ packages | flatten(levels=1) }}"
16     state: latest
17   tags:
18     - intel-inst-drivers
19
20 - name: Check Presence of Intel Ethernet 700 Series
21   ansible.builtin.shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572; lspci -d 8086:158a; lspci -d 8086:158b"
22   register: intel_700_pcis
23   failed_when: false
24   changed_when: false
25   tags:
26     - intel-inst-drivers
27
28 - name: Check Presence of Intel Ethernet 800 Series
29   ansible.builtin.shell: "lspci -d 8086:1592; lspci -d 8086:1891; lspci -d 8086:188c"
30   register: intel_800_pcis
31   failed_when: false
32   changed_when: false
33   tags:
34     - intel-inst-drivers
35
36 - name: Check Presence of Intel DSA
37   ansible.builtin.shell: "lspci -d 8086:0b25"
38   register: intel_dsa_pcis
39   failed_when: false
40   changed_when: false
41   tags:
42     - intel-inst-drivers
43
44 - name: Check Presence of Intel C4XXX
45   ansible.builtin.shell: "lspci -d 8086:18a0"
46   register: intel_qat1_pcis
47   failed_when: false
48   changed_when: false
49   tags:
50     - intel-inst-drivers
51
52 - name: Check Presence of Intel 4XXX
53   ansible.builtin.shell: "lspci -d 8086:4942"
54   register: intel_qat2_pcis
55   failed_when: false
56   changed_when: false
57   tags:
58     - intel-inst-drivers
59
60 - name: Get Intel Ethernet 700 Series driver versions
61   ansible.builtin.set_fact:
62     i40e: "{{ intel_700_compatibility_matrix[intel_700_matrix]['i40e'] }}"
63     iavf: "{{ intel_700_compatibility_matrix[intel_700_matrix]['iavf'] }}"
64     nvm: "{{ intel_700_compatibility_matrix[intel_700_matrix]['nvm'] }}"
65   when: >
66     intel_700_matrix is defined
67   tags:
68     - intel-inst-drivers
69
70 - name: Get Intel Ethernet 800 Series driver versions
71   ansible.builtin.set_fact:
72     ice: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ice'] }}"
73     ddp: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ddp'] }}"
74     iavf: "{{ intel_800_compatibility_matrix[intel_800_matrix]['iavf'] }}"
75     nvm: "{{ intel_800_compatibility_matrix[intel_800_matrix]['nvm'] }}"
76   when: >
77     intel_800_matrix is defined
78   tags:
79     - intel-inst-drivers
80
81 - name: Get Intel DSA driver versions
82   ansible.builtin.set_fact:
83     dsa: "{{ intel_dsa_compatibility_matrix['dsa'] }}"
84   when: >
85     intel_dsa_matrix is defined
86   tags:
87     - intel-inst-drivers
88
89 - name: Get Intel QAT driver versions
90   ansible.builtin.set_fact:
91     qat1: "{{ intel_qat_compatibility_matrix['qat1'] }}"
92     qat2: "{{ intel_qat_compatibility_matrix['qat2'] }}"
93   when: >
94     intel_qat_matrix is defined
95   tags:
96     - intel-inst-drivers
97
98 - name: Driver Intel Ethernet 700 Series
99   import_tasks: i40e.yaml
100   when: >
101     intel_700_pcis.stdout_lines | length > 0 and
102     intel_700_matrix is defined
103   tags:
104     - intel-inst-drivers
105
106 - name: Driver Intel Ethernet 800 Series
107   import_tasks: ice.yaml
108   when: >
109     intel_800_pcis.stdout_lines | length > 0 and
110     intel_800_matrix is defined
111   tags:
112     - intel-inst-drivers
113
114 - name: Driver Intel iAVF
115   import_tasks: iavf.yaml
116   when: >
117     (intel_700_pcis.stdout_lines | length > 0 and
118     intel_700_matrix is defined) or
119     (intel_800_pcis.stdout_lines | length > 0 and
120     intel_800_matrix is defined)
121   tags:
122     - intel-inst-drivers
123
124 - name: Driver Intel DSA
125   import_tasks: dsa.yaml
126   when: >
127     intel_dsa_pcis.stdout_lines | length > 0 and
128     intel_dsa_matrix is defined
129   tags:
130     - intel-inst-drivers
131
132 - name: Driver Intel QAT 1.x
133   import_tasks: qat1.yaml
134   when: >
135     intel_qat1_pcis.stdout_lines | length > 0 and
136     intel_qat_matrix is defined
137   tags:
138     - intel-inst-drivers
139
140 - name: Driver Intel QAT 2.x
141   import_tasks: qat2.yaml
142   when: >
143     intel_qat2_pcis.stdout_lines | length > 0 and
144     intel_qat_matrix is defined
145   tags:
146     - intel-inst-drivers