--- # file: roles/mellanox/tasks/main.yaml - name: Inst - Update Package Cache (APT) apt: update_cache: true cache_valid_time: 3600 when: - ansible_distribution|lower == 'ubuntu' tags: - mellanox-inst-drivers - name: Inst - Prerequisites package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - mellanox-inst-drivers - name: Inst - Check Presence of Mellanox CX-5 shell: "lspci | grep Mellanox | awk '{print $1}'" register: mellanox_pcis failed_when: false changed_when: false tags: - mellanox-inst-drivers - name: Inst - Get Mellanox CX-5 OFED driver versions set_fact: ofed: "{{ mellanox_cx5_compatibility_matrix[mellanox_cx5_matrix]['ofed'] }}" when: > mellanox_pcis is defined tags: - mellanox-inst-drivers - name: Inst - Driver Mellanox CX-5 import_tasks: ofed.yaml when: > mellanox_pcis.stdout_lines | length > 0 and mellanox_cx5_matrix is defined tags: - mellanox-inst-drivers