David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 1 | --- |
| 2 | - name: Copy i40e Interface Driver |
| 3 | unarchive: |
| 4 | src=files/i40e-1.4.25.tar.gz |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 5 | dest=/home/{{ ansible_user }} |
| 6 | owner={{ ansible_user }} |
| 7 | group={{ ansible_user }} |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 8 | |
| 9 | - name: Build i40e Driver |
| 10 | command: make |
| 11 | args: |
| 12 | chdir: i40e-1.4.25/src |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 13 | creates: /home/{{ ansible_user }}/i40e-1.4.25/src/i40e/i40e.ko |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 14 | |
| 15 | - name: Unload i40e Driver |
| 16 | become: yes |
| 17 | modprobe: name=i40e state=absent |
| 18 | |
| 19 | - name: Install i40e Driver |
| 20 | become: yes |
| 21 | command: make install |
| 22 | args: |
| 23 | chdir: i40e-1.4.25/src |
| 24 | |
| 25 | - name: Load i40e Driver |
| 26 | become: yes |
| 27 | modprobe: name=i40e state=present |
| 28 | |
| 29 | - name: Persist i40e Driver Loadi |
| 30 | become: yes |
| 31 | lineinfile: |
| 32 | dest=/etc/modules |
| 33 | line="i40e" |
| 34 | state=present |
| 35 | insertafter=EOF |
| 36 | |
| 37 | - name: Remove Build Files |
| 38 | file: |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 39 | path=/home/{{ ansible_user }}/i40e-1.4.25 |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 40 | state=absent |