ab0dc52f451fa44662e5114cf58647e67ba0433e
[kuberef.git] / sw_config / bmra / patched_sriov_cni_install.yml
1 # SPDX-FileCopyrightText: 2021 Intel Corporation.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4 ---
5 - name: install dependencies
6   include_role:
7     name: install_dependencies
8
9 - name: clone sriov-cni repository
10   git:
11     repo: "{{ sriov_cni_url }}"
12     dest: "{{ sriov_cni_dir }}"
13     version: "{{ sriov_cni_version }}"
14     force: yes
15
16 # Ignore errors as this has been failing
17 - name: build sriov-cni plugin
18   make:
19     chdir: /usr/src/sriov-cni
20   ignore_errors: true
21
22 # missing go.sum entry for module providing package golang.org/x/sys/unix
23 - name: Force checkout as some files change after build error
24   shell:
25     cmd: git checkout -- .
26     chdir: /usr/src/sriov-cni
27
28 - name: build sriov-cni plugin
29   make:
30     chdir: /usr/src/sriov-cni
31
32 - name: create /opt/cni/bin
33   file:
34    path: "/opt/cni/bin"
35    state: directory
36    recurse: yes
37    mode: 0755
38
39 - name: install sriov-cni binary to /opt/cni/bin directory
40   copy:
41     src: /usr/src/sriov-cni/build/sriov
42     dest: /opt/cni/bin/sriov
43     mode: 0755
44     remote_src: yes