15 lines
240 B
Bash
15 lines
240 B
Bash
#!/bin/bash
|
|
OS_MASTER=$1
|
|
HOSTS=($(cat $2))
|
|
|
|
if [ $# -lt 1 ]
|
|
then
|
|
echo "Syntax: ./$(basename $0)<OpenShift master node> <file name>"
|
|
exit
|
|
fi
|
|
|
|
for host in "${HOSTS[@]}"
|
|
do
|
|
ssh -n root@$1 "oc adm drain --ignore-daemonsets $host"
|
|
done
|