Skip to content

Instantly share code, notes, and snippets.

@marcoceppi
Last active April 5, 2016 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marcoceppi/2b86e80f376ed790198aafdcaf9271e9 to your computer and use it in GitHub Desktop.
Save marcoceppi/2b86e80f376ed790198aafdcaf9271e9 to your computer and use it in GitHub Desktop.
machines=$(juju status --format json | python -c "import sys; import json; f = json.loads(sys.stdin.read()); print('\n'.join(f.get('machines', {}).keys()))")
for MACHINE_ID in $machines; do
echo "Machine $MACHINE_ID"
juju run --machine=$MACHINE_ID 'sudo initctl list | grep juju | xargs sudo status'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment