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 |
David K. Bainbridge | 17248c0 | 2016-08-29 17:04:34 -0700 | [diff] [blame] | 24 | changed_when: true |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 25 | |
| 26 | - name: Load i40e Driver |
| 27 | become: yes |
| 28 | modprobe: name=i40e state=present |
| 29 | |
| 30 | - name: Persist i40e Driver Loadi |
| 31 | become: yes |
| 32 | lineinfile: |
| 33 | dest=/etc/modules |
| 34 | line="i40e" |
| 35 | state=present |
| 36 | insertafter=EOF |
| 37 | |
| 38 | - name: Remove Build Files |
| 39 | file: |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 40 | path=/home/{{ ansible_user }}/i40e-1.4.25 |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 41 | state=absent |