2015-10-04 04:19:50 +08:00
|
|
|
---
|
2017-09-14 02:00:51 +08:00
|
|
|
- name: Set kubelet deployment to host if kubeadm is enabled
|
|
|
|
set_fact:
|
|
|
|
kubelet_deployment_type: host
|
|
|
|
when: kubeadm_enabled
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- kubeadm
|
2017-09-14 02:00:51 +08:00
|
|
|
|
2017-09-26 17:38:58 +08:00
|
|
|
- name: install | Copy kubeadm binary from download dir
|
2017-11-14 18:35:41 +08:00
|
|
|
synchronize:
|
|
|
|
src: "{{ local_release_dir }}/kubeadm"
|
|
|
|
dest: "{{ bin_dir }}/kubeadm"
|
|
|
|
compress: no
|
2018-09-16 10:50:56 +08:00
|
|
|
perms: yes
|
2017-11-14 18:35:41 +08:00
|
|
|
owner: no
|
|
|
|
group: no
|
|
|
|
delegate_to: "{{ inventory_hostname }}"
|
2017-09-14 02:00:51 +08:00
|
|
|
when: kubeadm_enabled
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- kubeadm
|
2017-09-14 02:00:51 +08:00
|
|
|
|
2017-09-26 17:38:58 +08:00
|
|
|
- name: install | Set kubeadm binary permissions
|
|
|
|
file:
|
|
|
|
path: "{{ bin_dir }}/kubeadm"
|
|
|
|
mode: "0755"
|
|
|
|
state: file
|
|
|
|
when: kubeadm_enabled
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- kubeadm
|
2017-09-26 17:38:58 +08:00
|
|
|
|
2018-01-29 19:37:48 +08:00
|
|
|
- include_tasks: "install_{{ kubelet_deployment_type }}.yml"
|
2017-02-10 13:34:43 +08:00
|
|
|
|
2017-02-10 19:50:26 +08:00
|
|
|
- name: install | Write kubelet systemd init file
|
2017-06-27 12:27:25 +08:00
|
|
|
template:
|
2017-02-10 13:34:43 +08:00
|
|
|
src: "kubelet.{{ kubelet_deployment_type }}.service.j2"
|
|
|
|
dest: "/etc/systemd/system/kubelet.service"
|
|
|
|
backup: "yes"
|
2017-02-10 19:50:26 +08:00
|
|
|
notify: restart kubelet
|