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