| |
| # Copyright 2017-present Open Networking Foundation |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| |
| --- |
| - name: Copy i40e Interface Driver |
| unarchive: |
| src=files/i40e-1.4.25.tar.gz |
| dest=/home/{{ ansible_user_id }} |
| |
| - name: Build i40e Driver |
| command: make |
| args: |
| chdir: i40e-1.4.25/src |
| creates: /home/{{ ansible_user_id }}/i40e-1.4.25/src/i40e/i40e.ko |
| |
| - name: Unload i40e Driver |
| become: yes |
| modprobe: name=i40e state=absent |
| |
| - name: Install i40e Driver |
| become: yes |
| command: make install |
| args: |
| chdir: i40e-1.4.25/src |
| changed_when: true |
| |
| - name: Load i40e Driver |
| become: yes |
| modprobe: name=i40e state=present |
| |
| - name: Persist i40e Driver Loadi |
| become: yes |
| lineinfile: |
| dest=/etc/modules |
| line="i40e" |
| state=present |
| insertafter=EOF |
| |
| - name: Remove Build Files |
| file: |
| path=/home/{{ ansible_user_id }}/i40e-1.4.25 |
| state=absent |