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

38 lines
1.2 KiB
YAML
Raw Normal View History

2015-10-04 04:19:50 +08:00
---
- name: Write kubelet systemd init file
template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes
notify: restart kubelet
2015-12-31 21:05:55 +08:00
when: init_system == "systemd"
- name: Write kubelet initd script
template: src=deb-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes
notify: restart reloaded-kubelet
when: init_system == "sysvinit" and ansible_os_family == "Debian"
- name: Write kubelet initd script
template: src=rh-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes
notify: restart reloaded-kubelet
when: init_system == "sysvinit" and ansible_os_family == "RedHat"
2015-10-04 04:19:50 +08:00
- name: Install kubelet binary
2015-11-20 18:18:37 +08:00
copy:
src={{ local_release_dir }}/kubernetes/bin/kubelet
2015-10-04 04:19:50 +08:00
dest={{ bin_dir }}
owner=kube
2015-12-18 05:46:50 +08:00
mode=0755
2015-10-04 04:19:50 +08:00
notify:
- restart kubelet
- name: Calico-plugin | Directory
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/ state=directory
when: kube_network_plugin == "calico"
- name: Calico-plugin | Binary
copy:
src={{ local_release_dir }}/calico/bin/calico
dest=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico
mode=0755
when: kube_network_plugin == "calico"
notify:
2015-12-31 21:05:55 +08:00
- restart kubelet