maketank-scripts from ansible

This commit is contained in:
2025-08-25 10:40:17 +02:00
parent 8ec81febba
commit 30ce409c4e
15 changed files with 281 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
echo
echo "FailoverIPs on hosts"
OUT=$(curl -u '#ws+7PVgXWxp:UypGThnJ5KJDXTCN' https://robot-ws.your-server.de/failover 2>/dev/null)
#OUT=$(cat fo)
#echo $OUT |
jq -a -r '.[] | [ .failover.ip, .failover.active_server_ip ] | @csv' <<< $OUT |
while read -r line
do
line=$(sed 's/"//g' <<< $line)
IFS=',' read -r -a arr <<< "$line"
FOIP=$(dig -x ${arr[0]} +short)
HOST=$(dig -x ${arr[1]} +short)
printf "%15s %20s => %15s %20s\n" ${arr[0]} ${FOIP::-1} ${arr[1]} ${HOST::-1}
done
echo
echo