Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assume I have the java cookbook and its dependencies downloaded from and can run chef-solo successfully.

Is there a command that I can run to install the latest Oracle JDK onto a Linux box, that does not involve creating a new recipe or editing the attributes/default.rb file in cookbook/java?

I know that I can use the -o option to provide the runlist...

I guess that I would need to use -j some-file-with.json to override the attributes... but I haven't been able to figure out what that json content looks like.

share|improve this question
up vote 5 down vote accepted

chef-solo is looking for a json file (when specified) with this format.

So to run your specific scenario, you'd want something like this:

  "java": {
    "install_flavor": "oracle_rpm",
    "jdk_version": "7",
    "oracle": {
      "accept_oracle_download_terms": true
  "run_list": [

Best of luck!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.