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

52 lines
1.8 KiB
YAML
Raw Normal View History

2015-10-04 04:19:50 +08:00
---
2015-12-22 18:50:55 +08:00
- 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
2015-12-31 21:05:55 +08:00
when: init_system == "systemd"
2016-01-04 21:22:18 +08:00
notify: restart systemd-kubelet
2015-12-31 21:05:55 +08:00
2015-12-22 18:50:55 +08:00
- name: install | Write kubelet initd script
2015-12-31 21:05:55 +08: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 21:22:18 +08:00
notify: restart kubelet
2015-12-31 21:05:55 +08:00
2015-12-22 18:50:55 +08:00
- name: install | Write kubelet initd script
2015-12-31 21:05:55 +08: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 21:22:18 +08:00
notify: restart kubelet
2015-10-04 04:19:50 +08:00
2015-12-22 18:50:55 +08:00
- name: install | Install kubelet binary
2016-01-04 21:58:27 +08:00
synchronize:
src: "{{ local_release_dir }}/kubernetes/bin/kubelet"
dest: "{{ bin_dir }}/kubelet"
times: yes
archive: no
2016-01-19 21:09:21 +08:00
set_remote_user: false
2016-01-22 04:18:45 +08:00
delegate_to: "{{ inventory_hostname }}"
2015-10-04 04:19:50 +08:00
notify:
- restart kubelet
2015-12-22 18:50:55 +08:00
- name: install | Perms kubelet binary
2016-01-04 21:58:27 +08:00
file: path={{ bin_dir }}/kubelet owner=kube mode=0755 state=file
2015-12-22 18:50:55 +08:00
- name: install | Calico-plugin | Directory
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/ state=directory
when: kube_network_plugin == "calico"
2015-12-22 18:50:55 +08:00
- name: install | Calico-plugin | Binary
2016-01-04 21:58:27 +08:00
synchronize:
src: "{{ local_release_dir }}/calico/bin/calico"
dest: "/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico"
times: yes
archive: no
2016-01-19 21:09:21 +08:00
set_remote_user: false
2016-01-22 04:18:45 +08:00
delegate_to: "{{ inventory_hostname }}"
when: kube_network_plugin == "calico"
2016-01-04 21:22:18 +08:00
notify: restart kubelet
2016-01-04 21:58:27 +08:00
2015-12-22 18:50:55 +08:00
- name: install | Perms calico plugin binary
2016-01-04 21:58:27 +08:00
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico owner=kube mode=0755 state=file
2016-01-09 17:45:50 +08:00
when: kube_network_plugin == "calico"