Created
September 17, 2013 22:08
-
-
Save silviabotros/6601384 to your computer and use it in GitHub Desktop.
all-chef-servers
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
#!/usr/bin/env bash | |
set -eu | |
DEFAULT_SERVER=$(knife block list | grep '\[ Currently Selected \]' | awk '{ print $2 }') | |
ALL_SERVERS=$(knife block list | grep '*' | awk '{ print $2 }') | |
for SERVER in $ALL_SERVERS; do | |
knife block use $SERVER | |
$* | |
done | |
knife block use $DEFAULT_SERVER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment