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: Create SRIOV driver folder in the target destination
21 src: "{{ playbook_dir }}/sriov_hardware_check.sh"
23 - name: Changing perm of "sh", adding "+x"
24 shell: "chmod +x sriov_hardware_check.sh"
28 - name: Register SRIOV
29 shell: "echo {{ SRIOV | default(False) }}"
30 - name: Run the script and Re-evaluate the variable
31 command: sriov/sriov_hardware_check.sh
34 _SRIOV: "{{ output.stdout }}"
35 - name: Recreate the conf file for every host
39 delegate_to: localhost
44 delegate_to: localhost
45 - name: Clean the script and folder.
50 # Run the following task only if the SRIOV is set to True
51 # i.e when SRIOV hardware is available
55 - name: Read SRIOV value from the conf file.
56 command: cat /tmp/sriov.conf
57 register: installer_output
60 SRIOV_NODE: "{{ installer_output.stdout }}"
61 - name: Load kud variables
66 - name: Create sriov folder
69 path: "{{ sriov_dest }}"
72 - name: Get SRIOV compatible driver
73 get_url: "url={{ driver_url }} dest=/tmp/{{ package }}.tar.gz"
75 - name: Extract sriov source code
77 src: "/tmp/{{ package }}.tar.gz"
78 dest: "{{ sriov_dest }}"
80 - name: Build the default target
82 chdir: "/tmp/sriov/{{ package }}/src"
85 # Copy all the driver and install script into target node
89 - name: Load kud variables
94 - name: create SRIOV driver folder in the target destination
102 src: "{{ sriov_dest }}/{{ package }}/src/iavf.ko"
107 src: "{{ playbook_dir }}/install_iavf_drivers.sh"
108 dest: sriov_driver/install.sh
111 - name: Changing perm of "install.sh", adding "+x"
112 file: dest=sriov_driver/install.sh mode=a+x
114 - name: Run a script with arguments
117 chdir: "sriov_driver"