0

New to chef.

I'm trying to install openjdk-6-jre-headless using chef, but first I went to try it out using apt-get and I get this this error

The following packages have unmet dependencies:
openjdk-6-jre-headless: Depends: openjdk-6-jre-lib (>= 6b27-1.12.3-0ubuntu1~10.04.1) but it is not going to be installed
                      Depends: ca-certificates-java but it is not going to be installed
                      Depends: tzdata-java but it is not going to be installed
                      Depends: java-common (>= 0.28) but it is not going to be installed
                      Depends: libnss3-1d (>= 3.12.3) but it is not going to be installed
                      Recommends: icedtea-6-jre-cacao (= 6b27-1.12.3-0ubuntu1~10.04.1) but it is not going to be installed

I know I could install each of those items by hand, but using chef-solo how would I automate all this. that is how could I get chef to install openjdk-6-jre-headless and install ALL the dependencies at the same time?

trustfundbaby
  • 215
  • 2
  • 3
  • 9

2 Answers2

2

All you have to do is write into your recipe:

package 'openjdk-6-jre-headless'

Chef will install dependencies automatically.

See the documentation on the 'package' resource.

Ellis Percival
  • 1,992
  • 1
  • 11
  • 5
Draco Ater
  • 357
  • 3
  • 12
0

The Chef apt provider adds the -y option to command lines so that all prompts are answered with "yes" and the command can run non-interactively.

Tim Potter
  • 1,764
  • 15
  • 15