2015-10-03 20:19:50 +00:00
|
|
|
---
|
2015-12-22 10:50:55 +00:00
|
|
|
- debug: msg="{{init_system == "systemd"}}"
|
|
|
|
- debug: msg="{{init_system}}"
|
|
|
|
|
|
|
|
- name: install | Write kubelet systemd init file
|
2015-12-11 10:32:13 +00:00
|
|
|
template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes
|
2015-12-31 13:05:55 +00:00
|
|
|
when: init_system == "systemd"
|
2016-01-04 13:22:18 +00:00
|
|
|
notify: restart systemd-kubelet
|
2015-12-31 13:05:55 +00:00
|
|
|
|
2015-12-22 10:50:55 +00:00
|
|
|
- name: install | Write kubelet initd script
|
2015-12-31 13:05:55 +00:00
|
|
|
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"
|
2016-01-04 13:22:18 +00:00
|
|
|
notify: restart kubelet
|
2015-12-31 13:05:55 +00:00
|
|
|
|
2015-12-22 10:50:55 +00:00
|
|
|
- name: install | Write kubelet initd script
|
2015-12-31 13:05:55 +00:00
|
|
|
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"
|
2016-01-04 13:22:18 +00:00
|
|
|
notify: restart kubelet
|
2015-10-03 20:19:50 +00:00
|
|
|
|
2015-12-22 10:50:55 +00:00
|
|
|
- name: install | Install kubelet binary
|
2016-01-22 15:37:07 +00:00
|
|
|
command: cp -pf "{{ local_release_dir }}/kubernetes/bin/kubelet" "{{ bin_dir }}/kubelet"
|
|
|
|
changed_when: false
|
|
|
|
notify: restart kubelet
|
2016-01-04 13:58:27 +00:00
|
|
|
|
2015-12-22 10:50:55 +00:00
|
|
|
- name: install | Calico-plugin | Directory
|
2015-12-28 21:02:30 +00:00
|
|
|
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/ state=directory
|
|
|
|
when: kube_network_plugin == "calico"
|
|
|
|
|
2015-12-22 10:50:55 +00:00
|
|
|
- name: install | Calico-plugin | Binary
|
2016-01-22 15:37:07 +00:00
|
|
|
command: cp -pf "{{ local_release_dir }}/calico/bin/calico" "/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico"
|
2015-12-28 21:02:30 +00:00
|
|
|
when: kube_network_plugin == "calico"
|
2016-01-22 15:37:07 +00:00
|
|
|
changed_when: false
|
2016-01-04 13:22:18 +00:00
|
|
|
notify: restart kubelet
|