single-step script to perform all administration, some ansible performance settings
This commit is contained in:
parent
0ca44cc623
commit
4fda00bfb5
8 changed files with 60 additions and 1 deletions
23
wait_ready.sh
Executable file
23
wait_ready.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z ""]
|
||||
then
|
||||
LABEL="UpskillChallengeNode"
|
||||
fi
|
||||
|
||||
NODESTATE="indeterminate"
|
||||
while [ "$NODESTATE" != "running" ]
|
||||
do
|
||||
OLDSTATE=$NODESTATE
|
||||
NODESTATE=$(linode-cli linodes list --format 'status' --label "$LABEL" --text | tail -n 1)
|
||||
if [ "$NODESTATE" = "status" ]
|
||||
then
|
||||
echo "No node detected."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$NODESTATE" != "$OLDSTATE" ]
|
||||
then
|
||||
echo "$(date '+%F %T'): $NODESTATE"
|
||||
fi
|
||||
done
|
||||
Reference in a new issue