From 11172c0f5beb1ebdad2399d653f4c3c342d12b11 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Sun, 16 Jun 2019 20:38:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tools/easzup=E4=B8=ADkubeasz=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/easzup | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/easzup b/tools/easzup index ec53431..566b000 100755 --- a/tools/easzup +++ b/tools/easzup @@ -85,19 +85,18 @@ EOF function get_kubeasz() { # check if kubeasz already existed [[ -d "/etc/ansible/roles/kube-node" ]] && { echo "[WARN] kubeasz already existed"; return 0; } - # temporarily move docker binaries - [[ -f "/etc/ansible/down/docker-${DOCKER_VER}.tgz" ]] && mv "/etc/ansible/down/docker-${DOCKER_VER}.tgz" /tmp - rm -rf /etc/ansible && \ echo -e "[INFO] \033[33mdownloading kubeasz\033[0m $KUBEASZ_VER" && \ docker pull easzlab/kubeasz:${KUBEASZ_VER} && \ echo "[INFO] run a temporary container" && \ docker run -d --name temp_easz easzlab/kubeasz:${KUBEASZ_VER} && \ + mv "/etc/ansible/down/docker-${DOCKER_VER}.tgz" /tmp && \ + rm -rf /etc/ansible && \ echo "[INFO] cp kubeasz code from the temporary container" && \ docker cp temp_easz:/etc/ansible /etc/ansible && \ echo "[INFO] stop&remove temporary container" && \ docker rm -f temp_easz && \ - [[ -f "/tmp/docker-${DOCKER_VER}.tgz" ]] && mv "/tmp/docker-${DOCKER_VER}.tgz" /etc/ansible/down || true + mv "/tmp/docker-${DOCKER_VER}.tgz" /etc/ansible/down } function get_k8s_bin() {