0

I'm creating a Vagrantfile that uses chef solo to install OpenJDK on Ubuntu 12.04. Is there a way to specify which specific package of OpenJDK is installed? This way I can be sure I'm consistent across multiple installs.

Jeff Storey
  • 448
  • 1
  • 7
  • 19

1 Answers1

1

You can specify the exact version number of a package as an attribute inside the package resource:

package "foo" do
  action :install
  version "1.2.3"
end

If the version number expected is not present in an available apt repository the recipe will fail with an exception.

Tim Potter
  • 1,764
  • 15
  • 15