From 5929935a19a74fbf75db507e6fca7e74fe838d89 Mon Sep 17 00:00:00 2001 From: ChengHao Yang <17496418+tico88612@users.noreply.github.com> Date: Tue, 5 Nov 2024 20:32:08 +0800 Subject: [PATCH] Refactor: use kubeadm_config_api_version variable I added the kubeadm_config_api_version variable in the previous commit, and remove kubeadm api version condition. Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com> --- roles/kubernetes/control-plane/tasks/kubeadm-setup.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/roles/kubernetes/control-plane/tasks/kubeadm-setup.yml b/roles/kubernetes/control-plane/tasks/kubeadm-setup.yml index 53babe9b1..5e8a677e5 100644 --- a/roles/kubernetes/control-plane/tasks/kubeadm-setup.yml +++ b/roles/kubernetes/control-plane/tasks/kubeadm-setup.yml @@ -88,13 +88,9 @@ kubeadm_config_api_fqdn: "{{ apiserver_loadbalancer_domain_name | default('lb-apiserver.kubernetes.local') }}" when: loadbalancer_apiserver is defined -- name: Set kubeadm api version to v1beta3 - set_fact: - kubeadmConfig_api_version: v1beta3 - - name: Kubeadm | Create kubeadm config template: - src: "kubeadm-config.{{ kubeadmConfig_api_version }}.yaml.j2" + src: "kubeadm-config.{{ kubeadm_config_api_version }}.yaml.j2" dest: "{{ kube_config_dir }}/kubeadm-config.yaml" mode: "0640"