X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=fdio.infra.ansible%2Froles%2Fintel%2Ftasks%2Fmain.yaml;h=62d8d90499a620c9d19fe604319e1d64d8e4fd87;hp=0d6134d452f3f6e2584585943b755d90fae530d1;hb=7338aede6f3fdb1ac4d9850c18c9960c96051afe;hpb=ca70f05328367e208545038e3f9b6289f77d8a86 diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml index 0d6134d452..62d8d90499 100644 --- a/fdio.infra.ansible/roles/intel/tasks/main.yaml +++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml @@ -1,48 +1,81 @@ --- -# file: roles/performance_tuning/tasks/main.yaml +# file: roles/intel/tasks/main.yaml - name: Inst - Update Package Cache (APT) apt: - update_cache: yes + update_cache: true cache_valid_time: 3600 when: - ansible_distribution|lower == 'ubuntu' tags: - intel-inst-drivers -- name: Inst - Machine Prerequisites +- name: Inst - Prerequisites 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 - failed_when: no - changed_when: no +- name: Inst - Check Presence of Intel Ethernet 700 Series + 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:1585; lspci -d 8086:1572" - register: intel_700_pcis - failed_when: no - changed_when: no +- name: Inst - Check Presence of Intel Ethernet 800 Series + shell: "lspci -d 8086:1592; lspci -d 8086:1891" + register: intel_800_pcis + failed_when: false + changed_when: false + tags: + - intel-inst-drivers + +- name: Inst - Get Intel Ethernet 700 Series driver versions + 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: Inst - Get Intel Ethernet 800 Series driver versions + 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: Inst - 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: Inst - Driver Intel Ethernet 810 Series +- name: Inst - 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: Inst - Driver Intel Ethernet 700 Series -# import_tasks: i40e.yaml -# when: -# - intel_700_pcis.stdout_lines | length > 0 -# tags: -# - intel-inst-drivers +- name: Inst - 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