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 |
Gary Wu | f1aabf9 | 2018-07-18 09:09:03 -0700 | [diff] [blame] | 9 | ssh -o StrictHostKeychecking=no root@$IP_ADDR "docker images -a | grep -v REPOSITORY | LC_ALL=C sort" |
| 10 | echo |
gwu | 8ca410b | 2018-07-17 10:54:45 -0700 | [diff] [blame] | 11 | done |