blob: c84bf9e38070b7fe4fc9d6188b91d717aba51744 [file] [log] [blame]
Jonathan Hart93956f52017-08-22 13:12:42 -07001
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. Bainbridge317e7d72016-05-11 08:31:44 -070017---
18- name: Copy i40e Interface Driver
19 unarchive:
20 src=files/i40e-1.4.25.tar.gz
Zack Williams642388d2017-04-12 22:39:15 -070021 dest=/home/{{ ansible_user_id }}
David K. Bainbridge317e7d72016-05-11 08:31:44 -070022
23- name: Build i40e Driver
24 command: make
25 args:
26 chdir: i40e-1.4.25/src
Zack Williams642388d2017-04-12 22:39:15 -070027 creates: /home/{{ ansible_user_id }}/i40e-1.4.25/src/i40e/i40e.ko
David K. Bainbridge317e7d72016-05-11 08:31:44 -070028
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. Bainbridge17248c02016-08-29 17:04:34 -070038 changed_when: true
David K. Bainbridge317e7d72016-05-11 08:31:44 -070039
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 Williams642388d2017-04-12 22:39:15 -070054 path=/home/{{ ansible_user_id }}/i40e-1.4.25
David K. Bainbridge317e7d72016-05-11 08:31:44 -070055 state=absent