kubespray/roles/kubernetes/node/tasks/install.yml

38 lines
887 B
YAML
Raw Normal View History

2015-10-04 04:19:50 +08:00
---
- name: Set kubelet deployment to host if kubeadm is enabled
set_fact:
kubelet_deployment_type: host
when: kubeadm_enabled
tags:
- kubeadm
- name: install | Copy kubeadm binary from download dir
synchronize:
src: "{{ local_release_dir }}/kubeadm"
dest: "{{ bin_dir }}/kubeadm"
compress: no
owner: no
group: no
delegate_to: "{{ inventory_hostname }}"
when: kubeadm_enabled
tags:
- kubeadm
- name: install | Set kubeadm binary permissions
file:
path: "{{ bin_dir }}/kubeadm"
mode: "0755"
state: file
when: kubeadm_enabled
tags:
- kubeadm
- include_tasks: "install_{{ kubelet_deployment_type }}.yml"
- name: install | Write kubelet systemd init file
2017-06-27 12:27:25 +08:00
template:
src: "kubelet.{{ kubelet_deployment_type }}.service.j2"
dest: "/etc/systemd/system/kubelet.service"
backup: "yes"
notify: restart kubelet