aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-07-21 06:11:02 +0000
committerPeter Mikus <pmikus@cisco.com>2021-07-21 12:49:12 +0000
commitca70f05328367e208545038e3f9b6289f77d8a86 (patch)
treefe2f13a037d75afa27961539cc01f497b2c435ab /fdio.infra.ansible/roles
parent813375246758d1695be4e577ba9cd3f0791ea9e3 (diff)
Ansible: i40e driver install
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ib0e1b37e3d920f8d9a9e88896b6898fe13e4acba
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r--fdio.infra.ansible/roles/intel/defaults/main.yaml5
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/i40e.yaml30
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/ice.yaml84
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/main.yaml128
4 files changed, 143 insertions, 104 deletions
diff --git a/fdio.infra.ansible/roles/intel/defaults/main.yaml b/fdio.infra.ansible/roles/intel/defaults/main.yaml
index df86d65e9e..7789704598 100644
--- a/fdio.infra.ansible/roles/intel/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/intel/defaults/main.yaml
@@ -17,6 +17,11 @@ packages_by_arch:
- []
intel_download_url: "https://downloadmirror.intel.com"
+
+intel_i40e_version: "2.15.9"
+intel_i40e_driver_url: "{{ intel_download_url }}/24411/eng/i40e-{{ intel_i40e_version }}.tar.gz"
+intel_i40e_driver_dir: "/opt"
+
intel_ice_version: "1.4.11"
intel_ice_driver_url: "{{ intel_download_url }}/29746/eng/ice-{{ intel_ice_version }}.tar.gz"
intel_ice_driver_dir: "/opt"
diff --git a/fdio.infra.ansible/roles/intel/tasks/i40e.yaml b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml
new file mode 100644
index 0000000000..cf42f326c2
--- /dev/null
+++ b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml
@@ -0,0 +1,30 @@
+---
+# file: roles/intel/tasks/i40e.yaml
+
+- name: Inst - Get Network Adapter Driver
+ get_url:
+ url: "{{ intel_i40e_driver_url }}"
+ dest: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}.tar.gz"
+ mode: 0644
+ tags:
+ - intel-inst
+
+- name: Inst - Extract Network Adapter Driver
+ unarchive:
+ remote_src: true
+ src: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}.tar.gz"
+ dest: "{{ intel_i40e_driver_dir }}/"
+ creates: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}"
+ register: intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Inst - Network Adapter Driver
+ command: "make install; modprobe -r i40e; modprobe i40e"
+ args:
+ chdir: "{{ intel_i40e_driver_dir }}/i40e-{{ intel_i40e_version }}/src"
+ failed_when: no
+ when:
+ - intel_driver_extracted
+ tags:
+ - intel-inst
diff --git a/fdio.infra.ansible/roles/intel/tasks/ice.yaml b/fdio.infra.ansible/roles/intel/tasks/ice.yaml
new file mode 100644
index 0000000000..92a0eb4d7d
--- /dev/null
+++ b/fdio.infra.ansible/roles/intel/tasks/ice.yaml
@@ -0,0 +1,84 @@
+---
+# file: roles/intel/tasks/ice.yaml
+
+- name: Inst - Get Network Adapter Driver
+ get_url:
+ url: "{{ intel_ice_driver_url }}"
+ dest: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
+ mode: 0644
+ tags:
+ - intel-inst
+
+- name: Inst - Extract Network Adapter Driver
+ unarchive:
+ remote_src: true
+ src: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
+ dest: "{{ intel_ice_driver_dir }}/"
+ creates: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}"
+ register: intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Inst - Network Adapter Driver
+ command: "make install; modprobe -r ice; modprobe ice"
+ args:
+ chdir: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}/src"
+ failed_when: no
+ when:
+ - intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Inst - Get Dynamic Device Personalization (DDP) Package
+ get_url:
+ url: "{{ intel_ddp_profile_url }}"
+ dest: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
+ mode: 0644
+ tags:
+ - intel-inst
+
+- name: Inst - Extract Dynamic Device Personalization (DDP) Package
+ unarchive:
+ remote_src: true
+ src: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
+ dest: "{{ intel_ddp_profile_dir }}/"
+ creates: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
+ register: intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Inst - Extract Dynamic Device Personalization (DDP) Package
+ unarchive:
+ remote_src: true
+ src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
+ dest: "{{ intel_ddp_profile_dir }}/"
+ register: intel_driver_extracted
+ tags:
+ - intel-inst
+
+- name: Inst - Copy Dynamic Device Personalization (DDP) Package
+ copy:
+ src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.pkg"
+ dest: "/lib/firmware/updates/intel/ice/ddp/ice-{{ intel_ddp_version }}.pkg"
+ remote_src: yes
+ follow: yes
+ tags:
+ - intel-inst
+
+- name: Inst - Link Dynamic Device Personalization (DDP) Package
+ file:
+ src: "ice-{{ intel_ddp_version }}.pkg"
+ dest: "/lib/firmware/updates/intel/ice/ddp/ice.pkg"
+ state: link
+ tags:
+ - intel-inst
+
+- name: Inst - Extract Dynamic Device Personalization (DDP) Package (cleanup)
+ file:
+ path: "{{ item }}"
+ state: absent
+ with_items:
+ - "{{ intel_ddp_profile_dir }}/E810 DDP for Comms TechGuide_Rev2.3.pdf"
+ - "{{ intel_ddp_profile_dir }}/Intel_800_series_market_segment_DDP_license.txt"
+ tags:
+ - intel-inst
diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml
index 63ab5e03b6..0d6134d452 100644
--- a/fdio.infra.ansible/roles/intel/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml
@@ -1,13 +1,5 @@
---
-# file: roles/intel/tasks/main.yaml
-
-- name: Inst - Check Presence of Intel E810 Hardware
- shell: "lspci -d 8086:1592"
- register: intel_e810_pcis
- failed_when: no
- changed_when: no
- tags:
- - intel-inst
+# file: roles/performance_tuning/tasks/main.yaml
- name: Inst - Update Package Cache (APT)
apt:
@@ -15,114 +7,42 @@
cache_valid_time: 3600
when:
- ansible_distribution|lower == 'ubuntu'
- - intel_e810_pcis.stdout_lines | length > 0
tags:
- - intel-inst-prerequisites
+ - intel-inst-drivers
-- name: Inst - Prerequisites
+- name: Inst - Machine Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
- when:
- - intel_e810_pcis.stdout_lines | length > 0
tags:
- - intel-inst-prerequisites
+ - intel-inst-drivers
-- name: Inst - Get Network Adapter Driver
- get_url:
- url: "{{ intel_ice_driver_url }}"
- dest: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
- mode: 0644
- when:
- - intel_e810_pcis.stdout_lines | length > 0
- tags:
- - intel-inst
-
-- name: Inst - Extract Network Adapter Driver
- unarchive:
- remote_src: true
- src: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
- dest: "{{ intel_ice_driver_dir }}/"
- creates: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}"
- register: intel_driver_extracted
- when:
- - intel_e810_pcis.stdout_lines | length > 0
- tags:
- - intel-inst
-
-- name: Inst - Network Adapter Driver
- command: "make install; modprobe -r ice; modprobe ice"
- args:
- chdir: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}/src"
+- name: Inst - Check Presence of Intel Ethernet 810 Series
+ shell: "lspci -d 8086:1592"
+ register: intel_e810_pcis
failed_when: no
- when:
- - intel_e810_pcis.stdout_lines | length > 0
- - intel_driver_extracted
- tags:
- - intel-inst
-
-- name: Inst - Get Dynamic Device Personalization (DDP) Package
- get_url:
- url: "{{ intel_ddp_profile_url }}"
- dest: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
- mode: 0644
- when:
- - intel_e810_pcis.stdout_lines | length > 0
- tags:
- - intel-inst
-
-- name: Inst - Extract Dynamic Device Personalization (DDP) Package
- unarchive:
- remote_src: true
- src: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
- dest: "{{ intel_ddp_profile_dir }}/"
- creates: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
- register: intel_driver_extracted
- when:
- - intel_e810_pcis.stdout_lines | length > 0
- tags:
- - intel-inst
-
-- name: Inst - Extract Dynamic Device Personalization (DDP) Package
- unarchive:
- remote_src: true
- src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
- dest: "{{ intel_ddp_profile_dir }}/"
- register: intel_driver_extracted
- when:
- - intel_e810_pcis.stdout_lines | length > 0
+ changed_when: no
tags:
- - intel-inst
+ - intel-inst-drivers
-- name: Inst - Copy Dynamic Device Personalization (DDP) Package
- copy:
- src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.pkg"
- dest: "/lib/firmware/updates/intel/ice/ddp/ice-{{ intel_ddp_version }}.pkg"
- remote_src: yes
- follow: yes
- when:
- - intel_e810_pcis.stdout_lines | length > 0
+- name: Inst - Check Presence of Intel Ethernet 700 Series
+ shell: "lspci -d 8086:1585; lspci -d 8086:1572"
+ register: intel_700_pcis
+ failed_when: no
+ changed_when: no
tags:
- - intel-inst
+ - intel-inst-drivers
-- name: Inst - Link Dynamic Device Personalization (DDP) Package
- file:
- src: "ice-{{ intel_ddp_version }}.pkg"
- dest: "/lib/firmware/updates/intel/ice/ddp/ice.pkg"
- state: link
+- name: Inst - Driver Intel Ethernet 810 Series
+ import_tasks: ice.yaml
when:
- intel_e810_pcis.stdout_lines | length > 0
tags:
- - intel-inst
+ - intel-inst-drivers
-- name: Inst - Extract Dynamic Device Personalization (DDP) Package (cleanup)
- file:
- path: "{{ item }}"
- state: absent
- with_items:
- - "{{ intel_ddp_profile_dir }}/E810 DDP for Comms TechGuide_Rev2.3.pdf"
- - "{{ intel_ddp_profile_dir }}/Intel_800_series_market_segment_DDP_license.txt"
- when:
- - intel_e810_pcis.stdout_lines | length > 0
- tags:
- - intel-inst
+#- name: Inst - Driver Intel Ethernet 700 Series
+# import_tasks: i40e.yaml
+# when:
+# - intel_700_pcis.stdout_lines | length > 0
+# tags:
+# - intel-inst-drivers