--- - 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 synchronize: src: "{{ local_release_dir }}/kubernetes/bin/kubelet" dest: "{{ bin_dir }}/kubelet" mode: pull times: yes archive: no delegate_to: "{{ groups['downloader'][0] }}" notify: - restart kubelet - name: install | Perms kubelet binary file: path={{ bin_dir }}/kubelet owner=kube mode=0755 state=file - 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 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" notify: restart kubelet - name: install | Perms calico plugin binary file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico owner=kube mode=0755 state=file