Created
April 26, 2011 19:19
-
-
Save spheromak/942898 to your computer and use it in GitHub Desktop.
node dumper
This file contains hidden or 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="$( readlink -f -- "${0%/*}" )" | |
# assum bin is in chef_repo so nodes goto ../nodes/* | |
if [ -d $Bin/../nodes/$node ] ; then | |
for node in `knife node list -F text | awk -F\" '{print $2}'` ; do | |
echo "dumping $node" | |
knife node show $node > $Bin/../nodes/$node.json | |
done | |
else | |
echo "were tring to dump nodes to $bin/../nodes/, but it doesn't seem to exist." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment