| --- |
| - 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 |