adding support to install the mellanox or intel nic
Change-Id: I11c240d53a4d494dbccd76c2e7f415ed0cdfb0eb
diff --git a/roles/compute-node/tasks/mlx4_driver.yml b/roles/compute-node/tasks/mlx4_driver.yml
new file mode 100644
index 0000000..06219d2
--- /dev/null
+++ b/roles/compute-node/tasks/mlx4_driver.yml
@@ -0,0 +1,43 @@
+---
+- name: Install Prerequesites
+ become: yes
+ apt: name={{ item }} state=installed
+ with_items:
+ - debhelper
+ - autotools-dev
+ - dkms
+ - zlib1g-dev
+
+- name: Unarchive mlx4 driver package
+ unarchive:
+ copy=no
+ src=http://www.mellanox.com/downloads/Drivers/mlnx-en-3.1-1.0.4.tgz
+ dest=/tmp
+
+- name: Install mlx4 driver
+ become: yes
+ command: /tmp/mlnx-en-3.1-1.0.4/install.sh --batch
+
+- name: Remove Build Directory
+ become: yes
+ file:
+ path=/tmp/mlnx-en-3.1-1.0.4
+ state=absent
+
+- name: Remove Build files
+ become: yes
+ file:
+ path=/tmp/mlnx-en-3.1-1.0.4.tgz
+ state=absent
+
+- name: Remove Mellanox Service files
+ become: yes
+ file:
+ path=/etc/init/mlnx-en.conf
+ state=absent
+
+- name: Remove Mellanox Init Script
+ become: yes
+ file:
+ path=/etc/init.d/mlnx-en.d
+ state=absent