summaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/playbooks/configure-sriov.yml
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2020-10-01 14:17:59 -0700
committerTodd Malsbary <todd.malsbary@intel.com>2020-10-05 13:13:06 -0700
commit61dbe22ebb42279e388f53c557c267d43a774ed2 (patch)
treee32aae2483599a1d7dda614217656c96c19db9cc /kud/deployment_infra/playbooks/configure-sriov.yml
parente70a776fd2d16d7d386af0354afd3e086068ef00 (diff)
Build and deploy sriov module only on supported hosts.
Building on the target host fixes a couple issues: - In the containerized installer, the container image does not include the necessary kernel headers to build the module. - The build and target host must have the same kernel version. There is no guarantee of this. The deploy uses NFD, similar to the QAT playbook. Issue-ID: MULTICLOUD-1228 Signed-off-by: Todd Malsbary <todd.malsbary@intel.com> Change-Id: I58705b73b8ce6d381b4649d5a20b8644e51e1b13
Diffstat (limited to 'kud/deployment_infra/playbooks/configure-sriov.yml')
-rw-r--r--kud/deployment_infra/playbooks/configure-sriov.yml14
1 files changed, 6 insertions, 8 deletions
diff --git a/kud/deployment_infra/playbooks/configure-sriov.yml b/kud/deployment_infra/playbooks/configure-sriov.yml
index 45f276c6..c0b7c9e0 100644
--- a/kud/deployment_infra/playbooks/configure-sriov.yml
+++ b/kud/deployment_infra/playbooks/configure-sriov.yml
@@ -9,21 +9,19 @@
##############################################################################
- import_playbook: preconfigure-sriov.yml
-
- hosts: localhost
- become: yes
+ vars:
+ sriov_enabled: "{{ groups['kube-node'] | map('extract', hostvars, ['SRIOV_ENABLED']) | select() | list | length > 0 }}"
tasks:
- - debug:
- var: SRIOV_NODE
- name: Apply Multus
shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/../images/multus-daemonset.yml"
- when: SRIOV_NODE
+ when: sriov_enabled
- name: Apply SRIOV CNI
shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/../images/sriov-cni.yml"
- when: SRIOV_NODE
+ when: sriov_enabled
- name: Apply SRIOV DaemonSet
shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/../images/sriov-daemonset.yml"
- when: SRIOV_NODE
+ when: sriov_enabled
- name: Apply SRIOV Network Attachment definition
shell: "/usr/local/bin/kubectl apply -f {{ playbook_dir }}/sriov-nad.yml"
- when: SRIOV_NODE
+ when: sriov_enabled