--- # file: 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 shell: "lspci | grep Mellanox | awk '{print $1}'" register: mellanox_pcis failed_when: false changed_when: false tags: - mellanox-inst-drivers - name: Inst - Get Mellanox OFED driver versions set_fact: ofed: "{{ mellanox_compatibility_matrix[mellanox_matrix]['ofed'] }}" when: > mellanox_pcis.stdout_lines | length > 0 and mellanox_matrix is defined tags: - mellanox-inst-drivers - name: Inst - Driver Mellanox import_tasks: ofed.yaml when: > mellanox_pcis.stdout_lines | length > 0 and mellanox_matrix is defined tags: - mellanox-inst-drivers