Chef Resource Provider for Java
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gemfiles
libraries
recipes
test
.coveralls.yml
.gitignore
.kitchen.yml
.travis.yml
Berksfile
Gemfile
LICENSE
README.md
Rakefile
chefignore
metadata.rb

README.md

java

cookbook_file 'java_tar_gz' do
  source 'java.tar.gz'
  path '/tmp/java.tar.gz'
  owner 'root'
  group 'root'
  mode 00644
end

cookbook_file 'jce_zip' do
  source 'jce.zip'
  path '/tmp/jce.zip'
  owner 'root'
  group 'root'
  mode 00644
end

jdk_install_flavor = 'oracle'
jdk_version = 7
java_home = "/usr/lib/jvm/java-#{ jdk_version }-#{ jdk_install_flavor }"

java 'oracle_jdk' do
  install_type :tar
  install_options(
    source: '/tmp/java.tar.gz',
    jce_source: '/tmp/jce.zip',
    destination: java_home,
    strip_leading: true,
    install_jce: true
  )
end
java 'openjdk' do
  install_type :package
  install_options(
    provider: :openjdk,
    version: 7,
    update: 25,
    release: '2.3.10-1'
  )
end