X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=fdio.infra.ansible%2Froles%2Fintel%2Ftasks%2Fmain.yaml;h=d7598deca771041eadf28e99e0f86cd9cf00c9c4;hb=HEAD;hp=0d361a951dfcf0f910a34ab152e89ce5aed6335e;hpb=d41a5490f30a161561c39c4f1b08add17b9cf6f7;p=csit.git diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml index 0d361a951d..d7598deca7 100644 --- a/fdio.infra.ansible/roles/intel/tasks/main.yaml +++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml @@ -1,8 +1,8 @@ --- -# file: roles/performance_tuning/tasks/main.yaml +# file: tasks/main.yaml -- name: Inst - Update Package Cache (APT) - apt: +- name: Update Package Cache (APT) + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -10,46 +10,137 @@ tags: - intel-inst-drivers -- name: Inst - Machine Prerequisites - package: +- name: Install Prerequisites + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - intel-inst-drivers -- name: Inst - Check Presence of Intel Ethernet 810 Series - shell: "lspci -d 8086:1592" - register: intel_e810_pcis +- 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: Inst - Check Presence of Intel Ethernet 700 Series - shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572" - register: intel_700_pcis +- name: Check Presence of Intel Ethernet 800 Series + ansible.builtin.shell: "lspci -d 8086:1592; lspci -d 8086:1891; lspci -d 8086:188c" + register: intel_800_pcis failed_when: false changed_when: false tags: - intel-inst-drivers -- name: Inst - Driver Intel Ethernet 810 Series +- 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: Check Presence of Intel C4XXX + ansible.builtin.shell: "lspci -d 8086:18a0" + register: intel_qat1_pcis + failed_when: false + changed_when: false + tags: + - intel-inst-drivers + +- name: Check Presence of Intel 4XXX + ansible.builtin.shell: "lspci -d 8086:4942" + register: intel_qat2_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: + qat1: "{{ intel_qat_compatibility_matrix['qat1'] }}" + qat2: "{{ intel_qat_compatibility_matrix['qat2'] }}" + 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_e810_pcis.stdout_lines | length > 0 + 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: Inst - Driver Intel Ethernet 700 Series -# import_tasks: i40e.yaml -# when: -# - intel_700_pcis.stdout_lines | length > 0 -# tags: -# - intel-inst-drivers +- name: Driver Intel QAT 1.x + import_tasks: qat1.yaml + when: > + intel_qat1_pcis.stdout_lines | length > 0 and + intel_qat_matrix is defined + tags: + - intel-inst-drivers -# - name: Inst - VF Driver Intel -# import_tasks: iavf.yaml -# when: -# - intel_700_pcis.stdout_lines | length > 0 or intel_e810_pcis.stdout_lines | length > 0 -# tags: -# - intel-inst-drivers +- name: Driver Intel QAT 2.x + import_tasks: qat2.yaml + when: > + intel_qat2_pcis.stdout_lines | length > 0 and + intel_qat_matrix is defined + tags: + - intel-inst-drivers \ No newline at end of file