diff --git a/roles/network_plugin/calico/handlers/main.yml b/roles/network_plugin/calico/handlers/main.yml index 2c19347b2a6e0f5d2a6c4ff6989c4a67cce87b41..75fe2296c84a517cf38d42b38ee7f85a76c35540 100644 --- a/roles/network_plugin/calico/handlers/main.yml +++ b/roles/network_plugin/calico/handlers/main.yml @@ -12,14 +12,14 @@ state: absent - name: docker | delete calico-node containers - shell: "docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty docker rm -f" + shell: "{{ docker_bin_dir }}/docker ps -af name=k8s_POD_calico-node* -q | xargs --no-run-if-empty {{ docker_bin_dir }}/docker rm -f" register: docker_calico_node_remove until: docker_calico_node_remove is succeeded retries: 5 when: container_manager in ["docker"] - name: containerd | delete calico-node containers - shell: 'crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "crictl stopp % && crictl rmp %"' + shell: '{{ bin_dir }}/crictl pods --name calico-node-* -q | xargs -I% --no-run-if-empty bash -c "{{ bin_dir }}/crictl stopp % && {{ bin_dir }}/crictl rmp %"' register: crictl_calico_node_remove until: crictl_calico_node_remove is succeeded retries: 5