Created
December 1, 2011 18:01
-
-
Save benjaminws/1418613 to your computer and use it in GitHub Desktop.
Save roles
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 | |
# Get all your roles, save them to disk. | |
set -e | |
KNIFE=/usr/bin/knife | |
SAVE_DIR=~/chef-repo/roles | |
for role in `$KNIFE role list`; do | |
$KNIFE role show -F json $role > $SAVE_DIR/$role.json; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment