2

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.

5

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": [
    "recipe[java]"
  ]
}

Best of luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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