2022-01-27 10:08:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
check_controller()
|
|
|
|
{
|
|
|
|
controller=$1
|
|
|
|
model="cpe-focal"
|
|
|
|
|
|
|
|
juju status -m ${controller}:${model} --color | grep ^Unit -A 999999 | egrep -v "started.*focal|started.*bionic|active.*idle"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ -z "$1" ]] ; then
|
2022-03-14 11:32:10 +00:00
|
|
|
check_controller $(juju controllers --format json | jq -r .\"current-controller\")
|
2022-01-27 10:08:00 +00:00
|
|
|
else
|
|
|
|
check_controller $1
|
|
|
|
fi
|
|
|
|
|