diff --git a/roles/kubernetes/master/handlers/main.yml b/roles/kubernetes/master/handlers/main.yml index 8b00d1689..22af48901 100644 --- a/roles/kubernetes/master/handlers/main.yml +++ b/roles/kubernetes/master/handlers/main.yml @@ -2,24 +2,13 @@ - name: reload systemd command: systemctl daemon-reload -- name: restart kubelet +- name: restart systemd-kubelet command: /bin/true notify: - reload systemd - - restart reloaded-kubelet + - restart kubelet -- name: restart reloaded-kubelet +- name: restart kubelet service: name: kubelet state: restarted - -- name: restart proxy - command: /bin/true - notify: - - reload systemd - - restart reloaded-proxy - -- name: restart reloaded-proxy - service: - name: kube-proxy - state: restarted diff --git a/roles/kubernetes/node/handlers/main.yml b/roles/kubernetes/node/handlers/main.yml index 162c4cde1..22af48901 100644 --- a/roles/kubernetes/node/handlers/main.yml +++ b/roles/kubernetes/node/handlers/main.yml @@ -1,20 +1,14 @@ --- -- name: restart daemons - command: /bin/true - notify: - - reload systemd - - restart reloaded-kubelet - - name: reload systemd command: systemctl daemon-reload -- name: restart kubelet +- name: restart systemd-kubelet command: /bin/true notify: - reload systemd - - restart reloaded-kubelet + - restart kubelet -- name: restart reloaded-kubelet +- name: restart kubelet service: name: kubelet state: restarted diff --git a/roles/kubernetes/node/tasks/install.yml b/roles/kubernetes/node/tasks/install.yml index 036392ba2..815a4bc46 100644 --- a/roles/kubernetes/node/tasks/install.yml +++ b/roles/kubernetes/node/tasks/install.yml @@ -1,18 +1,18 @@ --- - name: Write kubelet systemd init file template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes - notify: restart kubelet when: init_system == "systemd" + notify: restart systemd-kubelet - name: Write kubelet initd script template: src=deb-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes - notify: restart reloaded-kubelet when: init_system == "sysvinit" and ansible_os_family == "Debian" + notify: restart kubelet - name: Write kubelet initd script template: src=rh-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes - notify: restart reloaded-kubelet when: init_system == "sysvinit" and ansible_os_family == "RedHat" + notify: restart kubelet - name: Install kubelet binary copy: @@ -33,5 +33,4 @@ dest=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico mode=0755 when: kube_network_plugin == "calico" - notify: - - restart kubelet + notify: restart kubelet diff --git a/roles/network_plugin/handlers/main.yml b/roles/network_plugin/handlers/main.yml index b875863e3..d692e7d79 100644 --- a/roles/network_plugin/handlers/main.yml +++ b/roles/network_plugin/handlers/main.yml @@ -1,6 +1,17 @@ --- +- name : reload systemd + shell: systemctl daemon-reload + +- name: restart systemd-calico-node + command: /bin/true + notify: + - reload systemd + - restart calico-node + - name: restart calico-node - service: name=calico-node state=restarted + service: + name: calico-node + state: restarted - name: restart docker service: name=docker state=restarted @@ -23,6 +34,3 @@ - name: start docker service: name=docker state=started - -- name : reload systemd - shell: systemctl daemon-reload