MODULES-5058 Allow a complete URL to be passed to the java::oracle class

This provides a workaround  to the issue of Oracle changing it's URL structure which breaks the dynamic URL building in the module.
It allows a complete URL to be passed as an alternative to one built by the logic in the module, and allows the rest of the module to function as expected when this situation is encountered.

Changes made to manifests/oracle.pp to pass URL in `url` parameter (if defined) to the `source` directive of the archive resource which fetches the installer package.
README.markdown has been updated to document the additional parameter, as well as a note added to known issues describing it's operation.
A test has been added to spec/defines/oracle_spec.rb to verify the correct package is present in the tmp archive location. The spec tests have passed and the revised workflow has been tested in a lab environment and found to be working.
This commit is contained in:
Stefan Pijnappels
2017-06-08 10:29:58 +01:00
parent 49369bd48c
commit 05b9d1c2ba
3 changed files with 22 additions and 2 deletions

View File

@@ -52,6 +52,11 @@ describe 'java::oracle', :type => :define do
it { is_expected.to contain_exec('Install Oracle java_se jre 8').that_requires('Archive[/tmp/jre-8u51-linux-x64.rpm]') }
end
context 'Pass URL to url parameter' do
let(:params) { {:ensure => 'present', :version_major => '8u131', :version_minor => 'b11', :java_se => 'jdk', :url => 'http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm'} }
let :title do 'jdk8' end
it { is_expected.to contain_archive('/tmp/jdk-8u131-linux-x64.rpm')}
end
end
context 'On CentOS 32-bit' do