2018-12-25 07:06:27 +00:00
|
|
|
---
|
2020-06-16 07:24:03 +00:00
|
|
|
- name: Get the kubeadm version
|
2018-12-25 07:06:27 +00:00
|
|
|
command: "{{ bin_dir }}/kubeadm version -o short"
|
2021-02-16 16:44:58 +00:00
|
|
|
environment: "{{ proxy_disable_env }}"
|
2018-12-25 07:06:27 +00:00
|
|
|
register: kubeadm_output
|
2020-06-16 07:24:03 +00:00
|
|
|
changed_when: false
|
2018-12-25 07:06:27 +00:00
|
|
|
|
2020-06-16 07:24:03 +00:00
|
|
|
- name: Set kubeadm api version to v1beta2
|
2019-07-02 08:51:08 +00:00
|
|
|
set_fact:
|
|
|
|
kubeadmConfig_api_version: v1beta2
|
|
|
|
|
2018-12-25 07:06:27 +00:00
|
|
|
- name: kubeadm | Create kubeadm config
|
|
|
|
template:
|
|
|
|
src: "kubeadm-config.{{ kubeadmConfig_api_version }}.yaml.j2"
|
|
|
|
dest: "{{ kube_config_dir }}/kubeadm-config.yaml"
|
2019-11-11 13:41:41 +00:00
|
|
|
mode: 0640
|