Created
May 16, 2014 10:22
-
-
Save jrha/75064b58c1e8cb9214e9 to your computer and use it in GitHub Desktop.
ClusterSSH into all nodes with a particular personality in Aquilon
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 | |
if [[ $# -eq 1 ]]; then | |
hosts=$(curl -s http://aquilon.example.com:6901/find/host?personality=$1) | |
if [[ $hosts ]]; then | |
cssh -l root $hosts | |
else | |
echo "ERROR: No hosts found with personality $1" | |
fi | |
else | |
echo "USAGE: aqssh PERSONALITY" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment