aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/mellanox
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-02-04 13:03:12 +0000
committerPeter Mikus <pmikus@cisco.com>2021-02-04 14:25:53 +0000
commitcfceaf325c290fc3a07f6c7cbefc1fc4af6dde1e (patch)
treeab955c24748e3e945f8876e96a996d9891ee6e14 /resources/tools/testbed-setup/ansible/roles/mellanox
parent879b31f02fb4df52016d7465e21377121dfbb515 (diff)
Infra: Move probes under ansible instead of terraform
+ More stable probe handling. + Naming cleanup due to errors. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I3bb1237af20636919f869f2eee53597202d00792
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/mellanox')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml20
1 files changed, 11 insertions, 9 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
index f677836702..1b81215a73 100644
--- a/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
@@ -1,21 +1,23 @@
---
# file: roles/mellanox/tasks/main.yaml
-- Name: Update package cache (apt)
+- name: Inst - Update Package Cache (APT)
apt:
update_cache: yes
cache_valid_time: 3600
when:
- ansible_distribution|lower == 'ubuntu'
+ tags:
+ - mellanox-inst-prerequisites
-- name: Mellanox Install - Install Distribution - Release - Machine Prerequisites
+- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
- - install-dependencies
+ - mellanox-inst-prerequisites
-- name: Mellanox Install - Check Presence of Mellanox Hardware
+- name: Check Presence of Mellanox Hardware
shell: "lspci | grep Mellanox | awk '{print $1}'"
register: mellanox_pcis
failed_when: no
@@ -23,7 +25,7 @@
tags:
- install-mellanox
-- name: Mellanox Install - Get OFED
+- name: Get OFED
get_url:
url: "http://content.mellanox.com/ofed/MLNX_OFED-{{ mellanox_version }}/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
dest: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
@@ -32,7 +34,7 @@
tags:
- install-mellanox
-- name: Mellanox Install - Extract OFED
+- name: Extract OFED
unarchive:
remote_src: true
src: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
@@ -43,7 +45,7 @@
tags:
- install-mellanox
-- name: Mellanox Install - Install OFED
+- name: Install OFED
command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs"
args:
chdir: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
@@ -51,13 +53,13 @@
tags:
- install-mellanox
-- name: Mellanox Install - Switch Infiniband to Ethernet
+- name: Switch Infiniband to Ethernet
command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2"
with_items: "{{ mellanox_pcis.stdout_lines }}"
tags:
- install-mellanox
-- name: Mellanox Install - FIX qemu-system removal
+- name: FIX qemu-system removal
package:
name: "qemu-system"
state: latest