Fix the problem that the script cannot remove existing installations because sudo keyword is missing.

This commit is contained in:
Byungjoon Lee
2015-08-14 12:26:01 +09:00
parent ea59172874
commit cdc2567787

View File

@@ -442,7 +442,7 @@ function kube-down {
echo "Cleaning on node ${i#*@}"
ssh -t $i 'pgrep etcd && sudo -p "[sudo] password for cleaning etcd data: " service etcd stop && sudo rm -rf /infra*'
# Delete the files in order to generate a clean environment, so you can change each node's role at next deployment.
ssh -t $i 'rm -f /opt/bin/kube* /etc/init/kube* /etc/init.d/kube* /etc/default/kube*; rm -rf ~/kube /var/lib/kubelet'
ssh -t $i 'sudo rm -f /opt/bin/kube* /etc/init/kube* /etc/init.d/kube* /etc/default/kube*; sudo rm -rf ~/kube /var/lib/kubelet'
}
done
wait