33 lines
1.3 KiB
YAML
33 lines
1.3 KiB
YAML
---
|
|
- debug: msg="{{init_system == "systemd"}}"
|
|
- debug: msg="{{init_system}}"
|
|
|
|
- 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 systemd-kubelet
|
|
|
|
- name: install | Write kubelet initd script
|
|
template: src=deb-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 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=755 backup=yes
|
|
when: init_system == "sysvinit" and ansible_os_family == "RedHat"
|
|
notify: restart kubelet
|
|
|
|
- name: install | Install kubelet binary
|
|
command: cp -pf "{{ local_release_dir }}/kubernetes/bin/kubelet" "{{ bin_dir }}/kubelet"
|
|
changed_when: false
|
|
notify: restart kubelet
|
|
|
|
- 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: cp -pf "{{ local_release_dir }}/calico/bin/calico" "/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico"
|
|
when: kube_network_plugin == "calico"
|
|
changed_when: false
|
|
notify: restart kubelet
|