From 704a0540640400973e1478d635348e3d343e3753 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Wed, 3 Mar 2021 18:45:00 -0500 Subject: [PATCH] Delete misnammed kubeadm-version.yml The important action in kubeadm-version.yml is the templating of the configuration, not finding / setting the version Signed-off-by: Etienne Champetier (cherry picked from commit a9c97e5253c455546c2c7fdd794147eeb9b8ab7a) Conflicts: roles/kubernetes/master/tasks/kubeadm-version.yml --- roles/kubernetes/master/tasks/kubeadm-setup.yml | 11 +++++++++-- roles/kubernetes/master/tasks/kubeadm-version.yml | 10 ---------- 2 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 roles/kubernetes/master/tasks/kubeadm-version.yml diff --git a/roles/kubernetes/master/tasks/kubeadm-setup.yml b/roles/kubernetes/master/tasks/kubeadm-setup.yml index e5308cd5dc4..cd18861227c 100644 --- a/roles/kubernetes/master/tasks/kubeadm-setup.yml +++ b/roles/kubernetes/master/tasks/kubeadm-setup.yml @@ -70,8 +70,15 @@ kubeadm_config_api_fqdn: "{{ apiserver_loadbalancer_domain_name|default('lb-apiserver.kubernetes.local') }}" when: loadbalancer_apiserver is defined -- name: kubeadm | set kubeadm version - import_tasks: kubeadm-version.yml +- name: Set kubeadm api version to v1beta2 + set_fact: + kubeadmConfig_api_version: v1beta2 + +- name: kubeadm | Create kubeadm config + template: + src: "kubeadm-config.{{ kubeadmConfig_api_version }}.yaml.j2" + dest: "{{ kube_config_dir }}/kubeadm-config.yaml" + mode: 0640 - name: kubeadm | Check if apiserver.crt contains all needed SANs command: openssl x509 -noout -in "{{ kube_cert_dir }}/apiserver.crt" -check{{ item|ipaddr|ternary('ip','host') }} "{{ item }}" diff --git a/roles/kubernetes/master/tasks/kubeadm-version.yml b/roles/kubernetes/master/tasks/kubeadm-version.yml deleted file mode 100644 index 603b9389ab4..00000000000 --- a/roles/kubernetes/master/tasks/kubeadm-version.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Set kubeadm api version to v1beta2 - set_fact: - kubeadmConfig_api_version: v1beta2 - -- name: kubeadm | Create kubeadm config - template: - src: "kubeadm-config.{{ kubeadmConfig_api_version }}.yaml.j2" - dest: "{{ kube_config_dir }}/kubeadm-config.yaml" - mode: 0640