Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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