Update cluster-update

This commit is contained in:
Torma Kristóf 2019-04-02 22:51:47 +02:00 committed by GitHub
parent f637c3bbc7
commit 284b6d909e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,11 @@
#!/bin/bash
WORKER_LIST="worker.list"
apt update
apt upgrade -y
./update.sh
for LINE in $(cat $WORKER_LIST | grep -vE "^#"); do
WORKERNAME=`echo $LINE | awk -F"/" '{print $NF}'`
echo "[worker:$WORKERNAME] Updating..."
ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < apt update
ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < apt upgrade -y
ssh $WORKERNAME -o "StrictHostKeyChecking no" "bash -s" < ./update.sh
echo "[worker:$WORKERNAME] Update is completed."
done