Last active
September 10, 2017 17:57
-
-
Save jamesbeedy/eaca40c935ffc8c2cfaf0ca7e0f33d4d to your computer and use it in GitHub Desktop.
list juju model users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
model="`juju models --format json | jq -r '.["current-model"]'`" | |
users=`juju show-model $model --format json | model=$model jq '.[env.model]["users"]' | jq -r 'keys[] as $k | "\($k)"'` | |
printf "Users in $model\n\n" | |
for user in $users; do | |
echo $user; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment