2015-10-03 20:19:50 +00:00
|
|
|
---
|
2017-09-13 18:00:51 +00:00
|
|
|
- name: Set kubelet deployment to host if kubeadm is enabled
|
|
|
|
set_fact:
|
|
|
|
kubelet_deployment_type: host
|
|
|
|
when: kubeadm_enabled
|
2017-10-05 07:43:04 +00:00
|
|
|
tags:
|
|
|
|
- kubeadm
|
2017-09-13 18:00:51 +00:00
|
|
|
|
2017-09-26 09:38:58 +00:00
|
|
|
- name: install | Copy kubeadm binary from download dir
|
2017-09-13 18:00:51 +00:00
|
|
|
command: rsync -piu "{{ local_release_dir }}/kubeadm" "{{ bin_dir }}/kubeadm"
|
|
|
|
changed_when: false
|
|
|
|
when: kubeadm_enabled
|
2017-10-05 07:43:04 +00:00
|
|
|
tags:
|
|
|
|
- kubeadm
|
2017-09-13 18:00:51 +00:00
|
|
|
|
2017-09-26 09:38:58 +00:00
|
|
|
- name: install | Set kubeadm binary permissions
|
|
|
|
file:
|
|
|
|
path: "{{ bin_dir }}/kubeadm"
|
|
|
|
mode: "0755"
|
|
|
|
state: file
|
|
|
|
when: kubeadm_enabled
|
2017-10-05 07:43:04 +00:00
|
|
|
tags:
|
|
|
|
- kubeadm
|
2017-09-26 09:38:58 +00:00
|
|
|
|
2018-01-29 11:37:48 +00:00
|
|
|
- include_tasks: "install_{{ kubelet_deployment_type }}.yml"
|
2017-02-10 05:34:43 +00:00
|
|
|
|
2017-02-10 11:50:26 +00:00
|
|
|
- name: install | Write kubelet systemd init file
|
2017-06-27 04:27:25 +00:00
|
|
|
template:
|
2017-02-10 05:34:43 +00:00
|
|
|
src: "kubelet.{{ kubelet_deployment_type }}.service.j2"
|
|
|
|
dest: "/etc/systemd/system/kubelet.service"
|
|
|
|
backup: "yes"
|
2017-02-10 11:50:26 +00:00
|
|
|
notify: restart kubelet
|