Update cluster-update
This commit is contained in:
parent
5c0dd4cfd6
commit
69a33f8c93
@ -1 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
WORKER_LIST="worker.list"
|
||||||
|
apt update
|
||||||
|
apt upgrade -y
|
||||||
|
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
|
||||||
|
|
||||||
|
echo "[worker:$WORKERNAME] Update is completed."
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user