Jonathan Hart | 93956f5 | 2017-08-22 13:12:42 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 17 | --- |
| 18 | - name: Copy i40e Interface Driver |
| 19 | unarchive: |
| 20 | src=files/i40e-1.4.25.tar.gz |
Zack Williams | 642388d | 2017-04-12 22:39:15 -0700 | [diff] [blame] | 21 | dest=/home/{{ ansible_user_id }} |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 22 | |
| 23 | - name: Build i40e Driver |
| 24 | command: make |
| 25 | args: |
| 26 | chdir: i40e-1.4.25/src |
Zack Williams | 642388d | 2017-04-12 22:39:15 -0700 | [diff] [blame] | 27 | 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] | 28 | |
| 29 | - name: Unload i40e Driver |
| 30 | become: yes |
| 31 | modprobe: name=i40e state=absent |
| 32 | |
| 33 | - name: Install i40e Driver |
| 34 | become: yes |
| 35 | command: make install |
| 36 | args: |
| 37 | chdir: i40e-1.4.25/src |
David K. Bainbridge | 17248c0 | 2016-08-29 17:04:34 -0700 | [diff] [blame] | 38 | changed_when: true |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 39 | |
| 40 | - name: Load i40e Driver |
| 41 | become: yes |
| 42 | modprobe: name=i40e state=present |
| 43 | |
| 44 | - name: Persist i40e Driver Loadi |
| 45 | become: yes |
| 46 | lineinfile: |
| 47 | dest=/etc/modules |
| 48 | line="i40e" |
| 49 | state=present |
| 50 | insertafter=EOF |
| 51 | |
| 52 | - name: Remove Build Files |
| 53 | file: |
Zack Williams | 642388d | 2017-04-12 22:39:15 -0700 | [diff] [blame] | 54 | path=/home/{{ ansible_user_id }}/i40e-1.4.25 |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 55 | state=absent |