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 |
| 5 | dest={{ ansible_env.HOME }} |
| 6 | owner=ubuntu |
| 7 | group=ubuntu |
| 8 | |
| 9 | - name: Build i40e Driver |
| 10 | command: make |
| 11 | args: |
| 12 | chdir: i40e-1.4.25/src |
| 13 | creates: "{{ ansible_env.HOME }}/i40e-1.4.25/src/i40e/i40e.ko" |
| 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: |
| 39 | path={{ ansible_env.HOME }}/i40e-1.4.25 |
| 40 | state=absent |