Skip to content

Instantly share code, notes, and snippets.

@BlackDex
Forked from marcoceppi/ohkay.sh
Last active May 9, 2016 07:56
Show Gist options
  • Save BlackDex/fd29c64fb28b8fb34937d7b2bb626eff to your computer and use it in GitHub Desktop.
Save BlackDex/fd29c64fb28b8fb34937d7b2bb626eff 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 | cut -d" " -f1 | xargs -I{} sudo status {}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment