Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Assume I have the java cookbook and its dependencies downloaded from http://community.opscode.com/cookbooks 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

1 Answer 1

up vote 4 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.