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 |
Zack Williams | 4d09b3b | 2017-04-12 22:39:15 -0700 | [diff] [blame] | 5 | dest=/home/{{ ansible_user_id }} |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 6 | |
| 7 | - name: Build i40e Driver |
| 8 | command: make |
| 9 | args: |
| 10 | chdir: i40e-1.4.25/src |
Zack Williams | 4d09b3b | 2017-04-12 22:39:15 -0700 | [diff] [blame] | 11 | creates: /home/{{ ansible_user_id }}/i40e-1.4.25/src/i40e/i40e.ko |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 12 | |
| 13 | - name: Unload i40e Driver |
| 14 | become: yes |
| 15 | modprobe: name=i40e state=absent |
| 16 | |
| 17 | - name: Install i40e Driver |
| 18 | become: yes |
| 19 | command: make install |
| 20 | args: |
| 21 | chdir: i40e-1.4.25/src |
David K. Bainbridge | 17248c0 | 2016-08-29 17:04:34 -0700 | [diff] [blame] | 22 | changed_when: true |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 23 | |
| 24 | - name: Load i40e Driver |
| 25 | become: yes |
| 26 | modprobe: name=i40e state=present |
| 27 | |
| 28 | - name: Persist i40e Driver Loadi |
| 29 | become: yes |
| 30 | lineinfile: |
| 31 | dest=/etc/modules |
| 32 | line="i40e" |
| 33 | state=present |
| 34 | insertafter=EOF |
| 35 | |
| 36 | - name: Remove Build Files |
| 37 | file: |
Zack Williams | 4d09b3b | 2017-04-12 22:39:15 -0700 | [diff] [blame] | 38 | path=/home/{{ ansible_user_id }}/i40e-1.4.25 |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 39 | state=absent |