diff --git a/scripts/.cleanup.sh b/scripts/.cleanup.sh index 4ac671a..afd2600 100755 --- a/scripts/.cleanup.sh +++ b/scripts/.cleanup.sh @@ -19,7 +19,6 @@ cleanuppaths() { } cleanupssh() { - set -x for host in ${!hosts[*]}; do ssh-keygen -R ${hosts[$host]} &>/dev/null done diff --git a/scripts/.common b/scripts/.common index 50ee599..4742d30 100644 --- a/scripts/.common +++ b/scripts/.common @@ -13,6 +13,10 @@ perror() { exit 1 } +sshcmd() { + ssh -o StrictHostKeyChecking=no $* +} + dls() { path=$1 shift diff --git a/scripts/2.first_start_k8s.sh b/scripts/2.first_start_k8s.sh index 0c9cc3b..2e07ac3 100755 --- a/scripts/2.first_start_k8s.sh +++ b/scripts/2.first_start_k8s.sh @@ -21,7 +21,7 @@ checkup() { while : do pinfo "Checking availability of node $host..." - if true | ssh root@${hosts[$host]}; + if true | sshcmd root@${hosts[$host]}; then pinfo "VM $host is up!" break @@ -39,7 +39,7 @@ checkup() { start_control_plane() { for host in ${!hosts[*]}; do - ssh root@${hosts[$host]} << EOF + sshcmd root@${hosts[$host]} << EOF if ls /etc/kubernetes/manifests.static/* &>/dev/null ; then mv /etc/kubernetes/manifests.static/* /var/lib/kubelet/manifests/ fi diff --git a/scripts/vars b/scripts/vars index a4a7067..3d292d4 100644 --- a/scripts/vars +++ b/scripts/vars @@ -24,5 +24,3 @@ QEMU_VM_MEM=8096 # Token file for dls tknfile=".dls_adm_token" -# SSH command args -SSH_CMD="ssh -o StrictHostKeyChecking=no"