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>
pull/11674/head
ChengHao Yang 2024-11-05 20:32:08 +08:00
parent 9317e7ef25
commit 5929935a19
No known key found for this signature in database
1 changed files with 1 additions and 5 deletions

View File

@ -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"