Update ovn4nfv chart version to support kubevirt
[multicloud/k8s.git] / kud / deployment_infra / playbooks / configure-sriov.yml
1 ---
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018
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 ##############################################################################
10
11 - import_playbook: preconfigure-sriov.yml
12 - hosts: localhost
13   vars:
14     sriov_enabled: "{{ groups['kube-node'] | map('extract', hostvars, ['SRIOV_ENABLED']) | select() | list | length > 0 }}"
15   tasks:
16     - name: Apply Multus
17       shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/../images/multus-daemonset.yml"
18       when: sriov_enabled
19     - name: Apply SRIOV CNI
20       shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/../images/sriov-cni.yml"
21       when: sriov_enabled
22     - name: Apply SRIOV DaemonSet
23       shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/../images/sriov-daemonset.yml"
24       when: sriov_enabled
25     - name: Apply SRIOV Network Attachment definition
26       shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/sriov-nad.yml"
27       when: sriov_enabled