Unverified Commit 22f9a8d3 authored by Babak K. Shandiz's avatar Babak K. Shandiz Committed by GitHub

fix(juju): add `public-address` fallback to `jaddr` (#12046)

parent e0213342
...@@ -98,7 +98,7 @@ jaddr() { ...@@ -98,7 +98,7 @@ jaddr() {
elif [[ $# -eq 2 ]]; then elif [[ $# -eq 2 ]]; then
# Get unit address # Get unit address
juju status "$1/$2" --format=json \ juju status "$1/$2" --format=json \
| jq -r ".applications.\"$1\".units.\"$1/$2\".address" | jq -r ".applications.\"$1\".units.\"$1/$2\" | .address // .\"public-address\""
else else
echo "Invalid number of arguments." echo "Invalid number of arguments."
echo "Usage: jaddr <app-name> [<unit-number>]" echo "Usage: jaddr <app-name> [<unit-number>]"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment