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
mkdir environments | |
for env in $(knife environment list); do | |
knife environment show "${env}" --format=json > "environments/${env}.json" | |
done |
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
# Retrieve the size of Chef cookbooks used by different organizations on the Chef server it runs on | |
# Should run as root normally since we use su to hop across to another user | |
full_org_list='' | |
full_file_list='' | |
orgs={} | |
# Getting orgs can take a while, let's hold onto the results for repeat invocations | |
if not File.exist?('.orgs-cached') | |
# NOTE: this produces 2 header lines and a footer line that has the rowcount |
NewerOlder