gwu | 8ca410b | 2018-07-17 10:54:45 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
2 | |||||
3 | IFS=$'\n' | ||||
4 | SERVERS=$(openstack server list -f json | jq -r '.[] | .Name + " " + .Networks' ) | ||||
5 | for SERVER in $SERVERS; do | ||||
6 | NAME=$(echo $SERVER | cut -d ' ' -f 1) | ||||
7 | IP_ADDR=$(echo $SERVER | cut -d ' ' -f 3) | ||||
8 | echo $NAME=$IP_ADDR | ||||
9 | ssh root@$IP_ADDR "docker ps -a | grep -v CONTAINER | LC_ALL=C sort" | ||||
10 | done |