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

48 lines
1.6 KiB
YAML
Raw Normal View History

2015-10-03 20:19:50 +00:00
---
- name: Write kubelet systemd init file
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
- name: 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"
2016-01-04 13:22:18 +00:00
notify: restart kubelet
2015-12-31 13:05:55 +00:00
- name: 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"
2016-01-04 13:22:18 +00:00
notify: restart kubelet
2015-10-03 20:19:50 +00:00
- name: Install kubelet binary
2016-01-04 13:58:27 +00:00
synchronize:
src: "{{ local_release_dir }}/kubernetes/bin/kubelet"
dest: "{{ bin_dir }}/kubelet"
mode: pull
times: yes
archive: no
delegate_to: "{{ groups['downloader'][0] }}"
2015-10-03 20:19:50 +00:00
notify:
- restart kubelet
2016-01-04 13:58:27 +00:00
- name: Perms kubelet binary
file: path={{ bin_dir }}/kubelet owner=kube mode=0755 state=file
- 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
2016-01-04 13:58:27 +00:00
synchronize:
src: "{{ local_release_dir }}/calico/bin/calico"
dest: "/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico"
mode: "pull"
times: yes
archive: no
delegate_to: "{{ groups['downloader'][0] }}"
when: kube_network_plugin == "calico"
2016-01-04 13:22:18 +00:00
notify: restart kubelet
2016-01-04 13:58:27 +00:00
- name: Perms calico plugin binary
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico owner=kube mode=0755 state=file