From 8908a70c19451719f3a3a153f005279be92f6135 Mon Sep 17 00:00:00 2001 From: Mateus Caruccio Date: Mon, 21 Sep 2020 11:20:32 -0300 Subject: [PATCH] Fails if kubeadm_version do not matches kubernetes version (#6302) --- roles/download/tasks/prep_kubeadm_images.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/download/tasks/prep_kubeadm_images.yml b/roles/download/tasks/prep_kubeadm_images.yml index 319851881..35b251466 100644 --- a/roles/download/tasks/prep_kubeadm_images.yml +++ b/roles/download/tasks/prep_kubeadm_images.yml @@ -1,4 +1,11 @@ --- +- name: prep_kubeadm_images | Check kubeadm version matches kubernetes version + fail: + msg: "Kubeadm version {{ kubeadm_version }} do not matches kubernetes {{ kube_version }}" + when: + - not skip_downloads | default(false) + - not kubeadm_version == downloads.kubeadm.version + - name: prep_kubeadm_images | Download kubeadm binary include_tasks: "download_file.yml" vars: