29 lines
1.2 KiB
YAML
29 lines
1.2 KiB
YAML
---
|
|
- name: install | Write kubelet systemd init file
|
|
template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes
|
|
when: init_system == "systemd"
|
|
notify: restart kubelet
|
|
|
|
- name: install | Write kubelet initd script
|
|
template: src=deb-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=0755 backup=yes
|
|
when: init_system == "sysvinit" and ansible_os_family == "Debian"
|
|
notify: restart kubelet
|
|
|
|
- name: install | Write kubelet initd script
|
|
template: src=rh-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=0755 backup=yes
|
|
when: init_system == "sysvinit" and ansible_os_family == "RedHat"
|
|
notify: restart kubelet
|
|
|
|
- name: install | Install kubelet binary
|
|
command: rsync -piu "{{ local_release_dir }}/kubernetes/bin/kubelet" "{{ bin_dir }}/kubelet"
|
|
register: kubelet_copy
|
|
changed_when: false
|
|
|
|
- name: install | Calico-plugin | Directory
|
|
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/ state=directory
|
|
when: kube_network_plugin == "calico"
|
|
|
|
- name: install | Calico-plugin | Binary
|
|
command: rsync -piu "{{ local_release_dir }}/calico/bin/calico" "/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico"
|
|
when: kube_network_plugin == "calico"
|
|
changed_when: false
|