Created
August 23, 2013 17:35
-
-
Save gene1wood/6321919 to your computer and use it in GitHub Desktop.
How to programatically set the Chef Server web UI password
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
require 'json' | |
dna=JSON.parse(IO.read("/opt/chef-server/embedded/cookbooks/dna.json")) | |
dna["chef_server"]["chef-server-webui"]["web_ui_admin_default_password"] = "YOUR PASSWORD GOES HERE" | |
File.open("/opt/chef-server/embedded/cookbooks/dna.json","w") do |f| | |
f.write(dna.to_json) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment