From 8f618ab40867620c50dbe4788ed864b68c830ed4 Mon Sep 17 00:00:00 2001 From: emiran-orange <71817149+emiran-orange@users.noreply.github.com> Date: Mon, 9 May 2022 23:56:32 +0200 Subject: [PATCH] Fix condition on kata_containers_version/kube_version when kata_containers_enabled is false (#8804) --- roles/kubernetes/preinstall/tasks/0020-verify-settings.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml index a58c2d7de..108da9261 100644 --- a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml @@ -248,7 +248,7 @@ You can set `etcd_deployment_type` to `kubeadm` instead of setting `etcd_kubeadm_enabled` to `true`." changed_when: true - - name: Stop if `etcd_kubeadm_enabled` is defined and `etcd_deployment_type` is not `kubadm` or `host` + - name: Stop if `etcd_kubeadm_enabled` is defined and `etcd_deployment_type` is not `kubeadm` or `host` assert: that: etcd_deployment_type == 'kubeadm' msg: > @@ -274,7 +274,9 @@ assert: that: kube_version is version('v1.22.0', '>') msg: "Kata containers version 2.3.0 is compatible with Kubernetes 1.22.0+" - when: kata_containers_version is version ('2.3.0', '>=') + when: + - kata_containers_enabled + - kata_containers_version is version ('2.3.0', '>=') - name: Stop if gvisor_enabled is enabled when container_manager is not containerd assert: