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.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Excellent, thanks! –  Jeff Storey Sep 27 '12 at 1:03

Your Answer

 
discard

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.