Last active
August 29, 2015 14:05
-
-
Save slyness/f84a016afd43f2fdce36 to your computer and use it in GitHub Desktop.
export a bunch of roles in json to files
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
| %w( myrole | |
| another | |
| thisone | |
| thatone | |
| somany | |
| roles ).each do |role| | |
| puts "exporting: " + role + "\n" | |
| content = `knife role show #{role} -F json | python -m json.tool` | |
| File.write("/tmp/roles/#{role}.json", content) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment