Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Created August 23, 2013 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gene1wood/6321919 to your computer and use it in GitHub Desktop.
Save gene1wood/6321919 to your computer and use it in GitHub Desktop.
How to programatically set the Chef Server web UI password
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