2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 - name: Load kud variables
18 - name: Create SRIOV dest folder
21 path: "{{ sriov_dest }}"
22 - name: Fetching SRIOV driver
24 - name: Download SRIOV driver tarball
26 url: "{{ sriov_driver_url }}"
27 dest: "{{ sriov_dest }}/{{ sriov_package }}.tar.gz"
32 - name: Load kud variables
36 - name: Create a destination for driver folder in the target's /tmp
41 - "{{ base_dest }}/sriov/{{ sriov_package }}"
42 - name: Create SRIOV dest folder
46 - name: Register SRIOV env variable
47 shell: "echo {{ SRIOV_ENABLED | default(False) }}"
48 - name: Copy SRIOV check script to target
50 src: "{{ playbook_dir }}/sriov_hardware_check.sh"
53 - name: Run the script and re-evaluate the variable
54 command: "sriov/sriov_hardware_check.sh"
57 var: output.stdout_lines
59 SRIOV_ENABLED: "{{ output.stdout }}"
62 - name: Clean the script and folder
66 - name: Install SRIOV compilation packges
70 with_items: "{{ sriov_pkgs }}"
72 - name: Extract SRIOV source code
74 src: "{{ sriov_dest }}/{{ sriov_package }}.tar.gz"
75 dest: "{{ base_dest }}/sriov"
77 - name: Build the SRIOV target
79 chdir: "{{ base_dest }}/sriov/{{ sriov_package }}/src"
81 - name: Create SRIOV driver folder in the target destination
88 - name: Copy SRIOV module to target destination
90 src: "{{ base_dest }}/sriov/{{ sriov_package }}/src/iavf.ko"
94 - name: Copy SRIOV install script to target
96 src: "{{ playbook_dir }}/install_iavf_drivers.sh"
97 dest: sriov_driver/install.sh
100 - name: Run the install script with arguments
103 chdir: "sriov_driver"
105 - name: Clean the SRIOV folder
107 path: "{{ base_dest }}/sriov"