Compare commits

...

30 Commits
1.4.3 ... 1.5.0

Author SHA1 Message Date
Bryan Jen
9d43ed058e Merge pull request #163 from HelenCampbell/1.5.0
Release prep for 1.5.0
2016-03-31 09:38:54 -07:00
Helen Campbell
15aff36b79 Release prep for 1.5.0 2016-03-31 17:21:59 +01:00
Hunter Haugen
749a735559 Merge pull request #159 from mmarseglia/master
Add support for official Oracle Java SE jdk and jre packages for CentOS
2016-03-02 10:08:57 -08:00
Marseglia. Mike
2bc036e043 fix syntax error in metadata.json 2016-02-26 11:47:16 -05:00
Marseglia. Mike
07767f0c8d update README with java::oracle usage, notes. removed puppet/archive as dependency since it is only required for java::oracle. 2016-02-26 11:18:46 -05:00
Hunter Haugen
b2c073e651 Merge pull request #160 from jyaworski/rhel71_java8
Use java 8 as the default on RHEL > 7.0
2016-02-24 10:55:54 -08:00
Joseph Yaworski
c8e46b5db2 Use java 8 as the default on RHEL > 7.0 2016-02-24 13:38:06 -05:00
Marseglia. Mike
06aecdb62a Add support for official Oracle Java SE jdk and jre packages for CentOS 2016-02-18 14:15:19 -05:00
Helen
a2e4898550 Merge pull request #158 from DavidS/debian-8-support
Update metadata to note Debian 8 support
2016-02-17 12:15:10 +00:00
David Schmitt
1c3dd32c81 Update metadata to note Debian 8 support 2016-02-17 11:58:14 +00:00
TP Honey
7b073c5ef6 Merge pull request #157 from DavidS/fm-4046-update-msync
(FM-4046) Update to current msync configs [006831f]
2016-02-16 17:04:40 +00:00
David Schmitt
7f4f864dfc (FM-4046) Update to current msync configs [006831f]
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
2016-02-16 16:33:34 +00:00
Bryan Jen
9a0fc641f9 Merge pull request #156 from joerayme/allow-tildes-in-version
Allow tildes in version to support webupd8team's packages
2016-02-08 09:09:10 -07:00
Joe Ray
e6a026d3c8 Merge branch 'master' into allow-tildes-in-version 2016-02-05 15:23:03 +00:00
Joe Ray
3bb3f325b7 Allow tildes in version to support webupd8team's packages
See http://ppa.launchpad.net/webupd8team/java/ubuntu/pool/main/o/oracle-java8-installer/
2016-02-05 15:05:19 +00:00
TP Honey
5152c9c25e Merge pull request #151 from tux-o-matic/master
Can now pass options to package provider
2016-01-29 13:39:13 +00:00
Benjamin Merot
3842d6f657 Added possibility to pass options to package
Exposed the Puppet 'package' resource's 'install_options' parameter via a new class parameter names 'package_options*. It takes an array of strings to pass installation options to the package provider of the targer OS (yum, apt-get, ...)

Added validation of $package_options array

Using stdlib' validate_array function to ensure that $package_options is a valid array (also if just empty).

Cleaned array validation line

Made $package_options undef by default

Class parameter $package_options is now set to undef by default, validation is done in the class to ensure only an array would be passed to it if set.

Added case for 'package_options' parameter

Will test the use of the 'package_options' parameter being passed the YUM option --downloadonly which will see YUM return 0 but package will not be installed on system.

Simplified test of 'package_options' parameter

As the test 'select openjdk for Fedora 21 without installing' expects with a successful YUM run but the 'java' package not present, specifying package version is irrelevant.

New case for complete installation with YUM option

Added new case using 'package_options' with a a YUM option expected to not prevent rpm installation.
Also added distribution parameter for test of 'pacakge_options' with yum option expected to prevent package installation.

Removed validation of package name

Removed validation of package name as it is not meant to be testing by 'select passed value for Fedora 21 with yum option'

Removed test with '--downloadonly'

The test of 'package_options* with the YUM option '---downloadonly' can't seem to be validate in CI.
Other test 'select passed value for Fedora 21 with yum option' covers passing a value to 'package_options* and passes test in CI.
2016-01-29 10:57:24 +01:00
Hunter Haugen
d69eedd7e2 Merge pull request #154 from DavidS/fm-4049-update-msync
(FM-4049) update to modulesync_configs
2016-01-27 08:36:38 -08:00
David Schmitt
3b8bba05ca (FM-4049) Update to current msync configs [2c99161] 2016-01-27 14:35:45 +00:00
TP Honey
aee0f6bc3f Merge pull request #153 from petems/MODULES-2928-add_freebsd_support
(MODULES-2928) Adds FreeBSD Support
2015-12-29 14:46:32 +00:00
Peter Souter
f1f2b830a0 (MODULES-2928) Adds FreeBSD Support
* Note this won't work by default on FreeBSD Puppet < 4.0, as pkgng is not the default provider 
* On older Puppet, use `zleslie/pkgng`, on newer it's the default package provider.
2015-12-29 13:11:47 +00:00
Bryan Jen
59a24e9eaf Merge pull request #152 from thomasodus/master
Added support for oracle-j2re1.8 and oracle-j2sdk1.8
2015-12-22 15:46:40 -07:00
thomas odukogbe
3a7ed12d49 Added support for oracle-j2re1.8 and oracle-j2sdk1.8 2015-12-21 11:27:45 +00:00
Helen Campbell
5b6470acf6 Merge remote-tracking branch 'upstream/1.4.x' 2015-12-08 16:23:35 +00:00
David Schmitt
4764484970 Merge pull request #117 from ccin2p3/f/libjvm_fact
add two facts: libjvm and java executable paths
2015-12-01 13:19:21 +00:00
Fabien Wernli
9c154890a3 add two facts: java_libjvm_path java_default_home
* dirname containing base directory of java
* e.g. java binary is `${::java_default_home}/jre/bin/java`

* dirname containing `libjvm.so`
* Most people will use this for LD_LIBRARY_PATH
2015-12-01 12:13:11 +01:00
Bryan Jen
4f0ee5a759 Merge pull request #147 from oc243/patch-2
Add support for Ubuntu 15.10
2015-11-20 09:34:33 -07:00
Oliver Chick
ca2171043e Add support for Ubuntu 15.10 2015-11-18 23:52:17 +00:00
David Schmitt
1236d9ee47 Merge pull request #145 from bmjen/git-fixtures
update fixtures.yml to use git instead of http
2015-10-15 17:39:46 +01:00
Bryan Jen
de05057e1d update fixtures.yml to use git instead of http 2015-10-15 09:37:37 -07:00
25 changed files with 878 additions and 78 deletions

View File

@@ -1,5 +1,6 @@
fixtures:
repositories:
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
archive: "git://github.com/voxpupuli/puppet-archive.git"
symlinks:
java: "#{source_dir}"

5
.gitattributes vendored Normal file
View File

@@ -0,0 +1,5 @@
#This file is generated by ModuleSync, do not edit.
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf

2
.gitignore vendored
View File

@@ -1,3 +1,4 @@
#This file is generated by ModuleSync, do not edit.
pkg/
Gemfile.lock
vendor/
@@ -5,5 +6,6 @@ spec/fixtures/
.vagrant/
.bundle/
coverage/
log/
.idea/
*.iml

2
.rspec Normal file
View File

@@ -0,0 +1,2 @@
--color
--format documentation

View File

@@ -1,7 +0,0 @@
---
.travis.yml:
extras:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"

View File

@@ -1,24 +1,20 @@
#This file is generated by ModuleSync, do not edit.
---
sudo: false
language: ruby
cache: bundler
bundler_args: --without system_tests
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
script: "bundle exec rake validate lint spec"
matrix:
fast_finish: true
include:
- rvm: 1.8.7
- rvm: 2.1.6
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.6
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
notifications:
email: false

View File

@@ -1,3 +1,23 @@
## Supported Release 1.5.0
### Summary
A release which has several support additions for different OSes. Also a couple of additional features and a few bug fixes.
#### Features
- Added Ubuntu 15.10 compatibility.
- Addition of two facts: java_libjvm_path and java_default_home.
- Added support for oracle-j2re1.8 and oracle-j2sdk1.8.
- Adds FreeBSD Support.
- Exposed the Puppet package resources install_options parameter via a new class parameter named package_options.
- Debian 8 support.
- Add support for official Oracle Java SE jdk and jre packages for CentOS.
- Use java 8 as the default on RHEL > 7.0.
#### Bugfixes
- Updated fixtures.yml to use git instead of http for stdlib.
- Updates to current msync configs.
- Small README updates and syntax error fixes.
## Supported Release 1.4.3
###Summary

View File

@@ -159,7 +159,7 @@ If you already have those gems installed, make sure they are up-to-date:
With all dependencies in place and up-to-date we can now run the tests:
```shell
% rake spec
% bundle exec rake spec
```
This will execute all the [rspec tests](http://rspec-puppet.com/) tests
@@ -178,8 +178,8 @@ installed on your system.
You can run them by issuing the following command
```shell
% rake spec_clean
% rspec spec/acceptance
% bundle exec rake spec_clean
% bundle exec rspec spec/acceptance
```
This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),

57
Gemfile
View File

@@ -1,48 +1,39 @@
#This file is generated by ModuleSync, do not edit.
source ENV['GEM_SOURCE'] || "https://rubygems.org"
def location_for(place, fake_version = nil)
if place =~ /^(git:[^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
def location_for(place, version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[version, { :git => $1, :branch => $2, :require => false}].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
['>= 0', { :path => File.expand_path($1), :require => false}]
else
[place, { :require => false }]
[place, version, { :require => false}].compact
end
end
group :development, :unit_tests do
gem 'rspec-core', '3.1.7', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
gem 'json', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet_facts', :require => false
gem 'puppet-blacksmith', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'rspec-puppet', '>= 2.3.2', :require => false
gem 'simplecov', :require => false
end
group :system_tests do
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4')
gem 'beaker', *location_for(ENV['BEAKER_VERSION'])
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'master_manipulator', :require => false
gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
end
gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'])
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
if File.exists? "#{__FILE__}.local"
eval(File.read("#{__FILE__}.local"), binding)
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

209
LICENSE
View File

@@ -1,17 +1,202 @@
Puppet Java Module - Puppet module for managing Java
Copyright (C) 2011 Puppet Labs Inc
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Puppet Labs can be contacted at: info@puppetlabs.com
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
1. Definitions.
http://www.apache.org/licenses/LICENSE-2.0
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

18
NOTICE Normal file
View File

@@ -0,0 +1,18 @@
java puppet module
Copyright (C) 2011-2016 Puppet Labs, Inc.
Puppet Labs can be contacted at: info@puppetlabs.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -34,6 +34,22 @@ class { 'java':
}
~~~
The defined type `java::oracle` installs one or more versions of Oracle Java SE. `java::oracle` depends on [puppet/archive](https://github.com/voxpupuli/puppet-archive). By using `java::oracle` you agree to Oracle's licensing terms for Java SE.
~~~
java::oracle { 'jdk6' :
ensure => 'present',
version => '6',
java_se => 'jdk',
}
java::oracle { 'jdk8' :
ensure => 'present',
version => '8',
java_se => 'jdk',
}
~~~
##Reference
###Classes
@@ -48,6 +64,7 @@ class { 'java':
* `java::params`: Builds a hash of jdk/jre packages for all compatible operating systems.
####Parameters
The following parameters are available in `java`:
@@ -71,6 +88,25 @@ Valid option: String. Default: undef.
Sets the version of Java to install, if you want to ensure a particular version.
Valid options: 'present', 'installed', 'latest', or a string matching `/^[.+_0-9a-zA-Z:-]+$/`. Default: 'present'.
####Public defined types
* `java::oracle`: Installs specified version of Oracle Java SE. You may install multiple versions of Oracle Jave SE on the same node using this defined type.
####Parameters
The following parameters are available in `java::oracle`:
######`version`
Version of Java Standard Edition (SE) to install. 6, 7 or 8.
#####`java_se`
Type of Java SE to install, jdk or jre.
#####`ensure`
Install or remove the package.
#####`oracle_url`
Official Oracle URL to download the binaries from.
###Facts
@@ -79,6 +115,8 @@ The java module includes a few facts to describe the version of Java installed o
* `java_major_version`: The major version of Java.
* `java_patch_level`: The patch level of Java.
* `java_version`: The full Java version string.
* `java_default_home`: The absolute path to the java system home directory (only available on Linux). For instance, the `java` executable's path would be `${::java_default_home}/jre/bin/java`. This is slightly different from the "standard" JAVA_HOME environment variable.
* `java_libjvm_path`: The absolute path to the directory containing the shared library `libjvm.so` (only available on Linux). Useful for setting `LD_LIBRARY_PATH` or configuring the dynamic linker.
**Note:** The facts return `nil` if Java is not installed on the system.
@@ -108,12 +146,25 @@ Sun Java is supported on:
* Debian 6
Oracle Java is supported on:
* CentOS 6
### A note to OpenBSD
OpenBSD packages install Java JRE/JDK in a unique directory structure, not linking
the binaries to a standard directory. Because of that, the path to this location
is hardcoded in the java_version fact. Whenever a Java upgrade to a newer
version/path will be done on OpenBSD, it has to be adapted there.
### A note to FreeBSD
By default on FreeBSD Puppet < 4.0, you will see an error as `pkgng` is not the default provider. To fix this, you can install the [zleslie/pkgng module](https://forge.puppetlabs.com/zleslie/pkgng) and set it as the default package provider like so:
```puppet
Package {
provider => 'pkgng',
}
On Puppet > 4.0 (ie. using the sysutils/puppet4 port), `pkgng` is included within Puppet and it's the default package provider.
##Development
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We cant access the huge number of platforms and myriad hardware, software, and deployment configurations that Puppet is intended to serve. We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For more information, see our [module contribution guide.](https://docs.puppetlabs.com/forge/contributing.html)

View File

@@ -1,5 +1,6 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet_blacksmith/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppetlabs_spec_helper/rake_tasks'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('relative')
@@ -8,3 +9,34 @@ PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
desc 'Generate pooler nodesets'
task :gen_nodeset do
require 'beaker-hostgenerator'
require 'securerandom'
require 'fileutils'
agent_target = ENV['TEST_TARGET']
if ! agent_target
STDERR.puts 'TEST_TARGET environment variable is not set'
STDERR.puts 'setting to default value of "redhat-64default."'
agent_target = 'redhat-64default.'
end
master_target = ENV['MASTER_TEST_TARGET']
if ! master_target
STDERR.puts 'MASTER_TEST_TARGET environment variable is not set'
STDERR.puts 'setting to default value of "redhat7-64mdcl"'
master_target = 'redhat7-64mdcl'
end
targets = "#{master_target}-#{agent_target}"
cli = BeakerHostGenerator::CLI.new([targets])
nodeset_dir = "tmp/nodesets"
nodeset = "#{nodeset_dir}/#{targets}-#{SecureRandom.uuid}.yaml"
FileUtils.mkdir_p(nodeset_dir)
File.open(nodeset, 'w') do |fh|
fh.print(cli.execute)
end
puts nodeset
end

View File

@@ -0,0 +1,21 @@
# Fact: java_default_home
#
# Purpose: get absolute path of java system home
#
# Resolution:
# Uses `readlink` to resolve the path of `/usr/bin/java` then returns subsubdir
#
# Caveats:
# Requires readlink
#
# Notes:
# None
Facter.add(:java_default_home) do
confine :kernel => 'Linux'
setcode do
if Facter::Util::Resolution.which('readlink')
java_bin = Facter::Util::Resolution.exec('readlink -e /usr/bin/java').strip
java_default_home = File.dirname(File.dirname(File.dirname(java_bin)))
end
end
end

View File

@@ -0,0 +1,25 @@
# Fact: java_libjvm_path
#
# Purpose: get path to libjvm.so
#
# Resolution:
# Lists file in java default home and searches for the file
#
# Caveats:
# Needs to list files recursively. Returns the first match
#
# Notes:
# None
Facter.add(:java_libjvm_path) do
confine :kernel => "Linux"
setcode do
java_default_home = Facter.value(:java_default_home)
java_libjvm_file = Dir.glob("#{java_default_home}/jre/lib/**/libjvm.so")
if java_libjvm_file.nil? || java_libjvm_file.empty?
nil
else
File.dirname(java_libjvm_file[0])
end
end
end

View File

@@ -18,6 +18,10 @@
# The name of the java package. This is configurable in case a non-standard
# java package is desired.
#
# [*package_options*]
# Array of strings to pass installation options to the 'package' Puppet resource.
# Options available depend on the 'package' provider for the target OS.
#
# [*java_alternative*]
# The name of the java alternative to use on Debian systems.
# "update-java-alternatives -l" will show which choices are available.
@@ -41,12 +45,17 @@ class java(
$distribution = 'jdk',
$version = 'present',
$package = undef,
$package_options = undef,
$java_alternative = undef,
$java_alternative_path = undef
) {
include java::params
validate_re($version, 'present|installed|latest|^[.+_0-9a-zA-Z:-]+$')
validate_re($version, 'present|installed|latest|^[.+_0-9a-zA-Z:~-]+$')
if $package_options != undef {
validate_array($package_options)
}
if has_key($java::params::java, $distribution) {
$default_package_name = $java::params::java[$distribution]['package']
@@ -98,8 +107,9 @@ class java(
anchor { 'java::begin:': }
->
package { 'java':
ensure => $version,
name => $use_java_package_name,
ensure => $version,
install_options => $package_options,
name => $use_java_package_name,
}
->
class { 'java::config': }

214
manifests/oracle.pp Normal file
View File

@@ -0,0 +1,214 @@
# Defined Type java::oracle
#
# Description
# Installs Oracle Java. By using this module you agree to the Oracle licensing
# agreement.
#
# Install one or more versions of Oracle Java.
#
# uses the following to download the package and automatically accept
# the licensing terms.
# wget --no-cookies --no-check-certificate --header \
# "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
# "http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jre-8u25-linux-x64.tar.gz"
#
# Parameters
# [*version*]
# Version of Java to install
#
# [*java_se*]
# Type of Java Standard Edition to install, jdk or jre.
#
# [*ensure*]
# Install or remove the package.
#
# [*oracle_url*]
# Official Oracle URL to download binaries from.
#
# Variables
# [*release_major*]
# Major version release number for java_se. Used to construct download URL.
#
# [*release_minor*]
# Minor version release number for java_se. Used to construct download URL.
#
# [*install_path*]
# Base install path for specified version of java_se. Used to determine if java_se
# has already been installed.
#
# [*package_type*]
# Type of installation package for specified version of java_se. java_se 6 comes
# in a few installation package flavors and we need to account for them.
#
# [*os*]
# Oracle java_se OS type.
#
# [*destination*]
# Destination directory to save java_se installer to. Usually /tmp on Linux and
# C:\TEMP on Windows.
#
# [*creates_path*]
# Fully qualified path to java_se after it is installed. Used to determine if
# java_se is already installed.
#
# [*arch*]
# Oracle java_se architecture type.
#
# [*package_name*]
# Name of the java_se installation package to download from Oracle's website.
#
# [*install_command*]
# Installation command used to install Oracle java_se. Installation commands
# differ by package_type. 'bin' types are installed via shell command. 'rpmbin'
# types have the rpms extracted and then foricibly installed. 'rpm' types are
# foricibly installed.
#
# [*url*]
# Full URL, including oracle_url, release_major, release_minor and package_name, to
# download the Oracle java_se installer.
#
# ### Author
# mike@marseglia.org
#
define java::oracle (
$ensure = 'present',
$version = '8',
$java_se = 'jdk',
$oracle_url = 'http://download.oracle.com/otn-pub/java/jdk/',
) {
# archive module is used to download the java package
include ::archive
ensure_resource('class', 'stdlib')
# validate java Standard Edition to download
if $java_se !~ /(jre|jdk)/ {
fail('Java SE must be either jre or jdk.')
}
# determine oracle Java major and minor version, and installation path
case $version {
'6' : {
$release_major = '6u45'
$release_minor = 'b06'
$install_path = "${java_se}1.6.0_45"
}
'7' : {
$release_major = '7u80'
$release_minor = 'b15'
$install_path = "${java_se}1.7.0_80"
}
'8' : {
$release_major = '8u51'
$release_minor = 'b16'
$install_path = "${java_se}1.8.0_51"
}
default : {
$release_major = '8u51'
$release_minor = 'b16'
$install_path = "${java_se}1.8.0_51"
}
}
# determine package type (exe/tar/rpm), destination directory based on OS
case $::kernel {
'Linux' : {
case $::operatingsystem {
'CentOS' : {
# Oracle Java 6 comes in a special rpmbin format
if $version == '6' {
$package_type = 'rpmbin'
} else {
$package_type = 'rpm'
}
}
default : {
fail ("unsupported platform ${::operatingsystem}") }
}
$os = 'linux'
$destination_dir = '/tmp/'
$creates_path = "/usr/java/${install_path}"
}
default : {
fail ( "unsupported platform ${::kernel}" ) }
}
# set java architecture nomenclature
case $::architecture {
'i386' : { $arch = 'i586' }
'x86_64' : { $arch = 'x64' }
default : {
fail ("unsupported platform ${::architecture}")
}
}
# following are based on this example:
# http://download.oracle.com/otn/java/jdk/7u80-b15/jre-7u80-linux-i586.rpm
#
# JaveSE 6 distributed in .bin format
# http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-i586-rpm.bin
# http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin
# package name to download from Oracle's website
case $package_type {
'bin' : {
$package_name = "${java_se}-${release_major}-${os}-${arch}.bin"
}
'rpmbin' : {
$package_name = "${java_se}-${release_major}-${os}-${arch}-rpm.bin"
}
'rpm' : {
$package_name = "${java_se}-${release_major}-${os}-${arch}.rpm"
}
default : {
$package_name = "${java_se}-${release_major}-${os}-${arch}.rpm"
}
}
# full path to the installer
$destination = "${destination_dir}${package_name}"
notice ("Destination is ${destination}")
case $package_type {
'bin' : {
$install_command = "sh ${destination}"
}
'rpmbin' : {
$install_command = "sh ${destination} -x; rpm --force -iv sun*.rpm; rpm --force -iv ${java_se}*.rpm"
}
'rpm' : {
$install_command = "rpm --force -iv ${destination}"
}
default : {
$install_command = "rpm -iv ${destination}"
}
}
case $ensure {
'present' : {
archive { $destination :
ensure => present,
source => "${oracle_url}${release_major}-${release_minor}/${package_name}",
cleanup => false,
cookie => 'gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie',
}->
case $::kernel {
'Linux' : {
exec { "Install Oracle java_se ${java_se} ${version}" :
path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
command => $install_command,
creates => $creates_path,
}
}
default : {
fail ("unsupported platform ${::kernel}")
}
}
}
default : {
notice ("Action ${ensure} not supported.")
}
}
}

View File

@@ -24,10 +24,14 @@ class java::params {
$jdk_package = 'java-1.6.0-openjdk-devel'
$jre_package = 'java-1.6.0-openjdk'
}
else {
elsif (versioncmp($::operatingsystemrelease, '7.1') < 0) {
$jdk_package = 'java-1.7.0-openjdk-devel'
$jre_package = 'java-1.7.0-openjdk'
}
else {
$jdk_package = 'java-1.8.0-openjdk-devel'
$jre_package = 'java-1.8.0-openjdk'
}
}
'Fedora': {
if (versioncmp($::operatingsystemrelease, '21') < 0) {
@@ -106,9 +110,21 @@ class java::params {
'alternative_path' => '/usr/lib/jvm/j2sdk1.7-oracle/jre/bin/java',
'java_home' => '/usr/lib/jvm/j2sdk1.7-oracle/jre/',
},
'oracle-j2re' => {
'package' => 'oracle-j2re1.8',
'alternative' => 'j2re1.8-oracle',
'alternative_path' => '/usr/lib/jvm/j2re1.8-oracle/bin/java',
'java_home' => '/usr/lib/jvm/j2re1.8-oracle/',
},
'oracle-j2sdk' => {
'package' => 'oracle-j2sdk1.8',
'alternative' => 'j2sdk1.8-oracle',
'alternative_path' => '/usr/lib/jvm/j2sdk1.8-oracle/bin/java',
'java_home' => '/usr/lib/jvm/j2sdk1.8-oracle/',
},
}
}
'vivid': {
'vivid', 'wily': {
$java = {
'jdk' => {
'package' => 'openjdk-8-jdk',
@@ -133,6 +149,12 @@ class java::params {
'jre' => { 'package' => 'jre', },
}
}
'FreeBSD': {
$java = {
'jdk' => { 'package' => 'openjdk', },
'jre' => { 'package' => 'openjdk-jre', },
}
}
'Solaris': {
$java = {
'jdk' => { 'package' => 'developer/java/jdk-7', },

View File

@@ -1,6 +1,6 @@
{
"name": "puppetlabs-java",
"version": "1.4.3",
"version": "1.5.0",
"author": "puppetlabs",
"summary": "Installs the correct Java package on various platforms.",
"license": "Apache-2.0",
@@ -50,7 +50,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"6",
"7"
"7",
"8"
]
},
{

View File

@@ -12,6 +12,11 @@ describe 'java', :type => :class do
it { should contain_package('java').with_name('java-1.7.0-openjdk-devel') }
end
context 'select openjdk for Centos 7.1.1503' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Centos', :operatingsystemrelease => '7.1.1503'} }
it { should contain_package('java').with_name('java-1.8.0-openjdk-devel') }
end
context 'select openjdk for Centos 6.2' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Centos', :operatingsystemrelease => '6.2'} }
it { should contain_package('java').with_name('java-1.6.0-openjdk-devel') }
@@ -47,6 +52,13 @@ describe 'java', :type => :class do
let(:params) { { 'distribution' => 'jre' } }
it { should contain_package('java').with_name('java-1.8.0-openjdk') }
end
context 'select passed value for Fedora 21 with yum option' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Fedora', :operatingsystemrelease => '21'} }
let(:params) { { 'distribution' => 'jre' } }
let(:params) { { 'package_options' => ['--skip-broken'] } }
it { should contain_package('java') }
end
context 'select passed value for Centos 5.3' do
let(:facts) { {:osfamily => 'RedHat', :operatingsystem => 'Centos', :operatingsystemrelease => '5.3'} }

142
spec/defines/oracle_spec.rb Normal file
View File

@@ -0,0 +1,142 @@
require 'spec_helper'
describe 'java::oracle', :type => :define do
context 'On CentOS 64-bit' do
let(:facts) { {:kernel => 'Linux', :architecture => 'x86_64', :osfamily => 'RedHat', :operatingsystem => 'CentOS', :operatingsystemrelease => '6.6', :puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)'} }
context 'Oracle Java SE 6 JDK' do
let(:params) { {:ensure => 'present', :version => '6', :java_se => 'jdk'} }
let :title do 'jdk6' end
it { should contain_archive('/tmp/jdk-6u45-linux-x64-rpm.bin')}
it { should contain_exec('Install Oracle java_se jdk 6').with_command('sh /tmp/jdk-6u45-linux-x64-rpm.bin -x; rpm --force -iv sun*.rpm; rpm --force -iv jdk*.rpm') }
end
context 'Oracle Java SE 7 JDK' do
let(:params) { {:ensure => 'present', :version => '7', :java_se => 'jdk'} }
let :title do 'jdk7' end
it { should contain_archive('/tmp/jdk-7u80-linux-x64.rpm')}
it { should contain_exec('Install Oracle java_se jdk 7').with_command('rpm --force -iv /tmp/jdk-7u80-linux-x64.rpm') }
end
context 'Oracle Java SE 8 JDK' do
let(:params) { {:ensure => 'present', :version => '8', :java_se => 'jdk'} }
let :title do 'jdk8' end
it { should contain_archive('/tmp/jdk-8u51-linux-x64.rpm')}
it { should contain_exec('Install Oracle java_se jdk 8').with_command('rpm --force -iv /tmp/jdk-8u51-linux-x64.rpm') }
end
context 'Oracle Java SE 6 JRE' do
let(:params) { {:ensure => 'present', :version => '6', :java_se => 'jre'} }
let :title do 'jre6' end
it { should contain_archive('/tmp/jre-6u45-linux-x64-rpm.bin')}
it { should contain_exec('Install Oracle java_se jre 6').with_command('sh /tmp/jre-6u45-linux-x64-rpm.bin -x; rpm --force -iv sun*.rpm; rpm --force -iv jre*.rpm') }
end
context 'Oracle Java SE 7 JRE' do
let(:params) { {:ensure => 'present', :version => '7', :java_se => 'jre'} }
let :title do 'jre7' end
it { should contain_archive('/tmp/jre-7u80-linux-x64.rpm')}
it { should contain_exec('Install Oracle java_se jre 7').with_command('rpm --force -iv /tmp/jre-7u80-linux-x64.rpm') }
end
context 'select Oracle Java SE 8 JRE' do
let(:params) { {:ensure => 'present', :version => '8', :java_se => 'jre'} }
let :title do 'jre8' end
it { should contain_archive('/tmp/jre-8u51-linux-x64.rpm')}
it { should contain_exec('Install Oracle java_se jre 8').with_command('rpm --force -iv /tmp/jre-8u51-linux-x64.rpm') }
end
end
context 'On CentOS 32-bit' do
let(:facts) { {:kernel => 'Linux', :architecture => 'i386', :osfamily => 'RedHat', :operatingsystem => 'CentOS', :operatingsystemrelease => '6.6', :puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)'} }
context 'select Oracle Java SE 6 JDK on RedHat family, 32-bit' do
let(:params) { {:ensure => 'present', :version => '6', :java_se => 'jdk'} }
let :title do 'jdk6' end
it { should contain_archive('/tmp/jdk-6u45-linux-i586-rpm.bin')}
it { should contain_exec('Install Oracle java_se jdk 6').with_command('sh /tmp/jdk-6u45-linux-i586-rpm.bin -x; rpm --force -iv sun*.rpm; rpm --force -iv jdk*.rpm') }
end
context 'select Oracle Java SE 7 JDK on RedHat family, 32-bit' do
let(:params) { {:ensure => 'present', :version => '7', :java_se => 'jdk'} }
let :title do 'jdk7' end
it { should contain_archive('/tmp/jdk-7u80-linux-i586.rpm')}
it { should contain_exec('Install Oracle java_se jdk 7').with_command('rpm --force -iv /tmp/jdk-7u80-linux-i586.rpm') }
end
context 'select Oracle Java SE 8 JDK on RedHat family, 32-bit' do
let(:params) { {:ensure => 'present', :version => '8', :java_se => 'jdk'} }
let :title do 'jdk8' end
it { should contain_archive('/tmp/jdk-8u51-linux-i586.rpm')}
it { should contain_exec('Install Oracle java_se jdk 8').with_command('rpm --force -iv /tmp/jdk-8u51-linux-i586.rpm') }
end
context 'select Oracle Java SE 6 JRE on RedHat family, 32-bit' do
let(:params) { {:ensure => 'present', :version => '6', :java_se => 'jre'} }
let :title do 'jdk6' end
it { should contain_archive('/tmp/jre-6u45-linux-i586-rpm.bin')}
it { should contain_exec('Install Oracle java_se jre 6').with_command('sh /tmp/jre-6u45-linux-i586-rpm.bin -x; rpm --force -iv sun*.rpm; rpm --force -iv jre*.rpm') }
end
context 'select Oracle Java SE 7 JRE on RedHat family, 32-bit' do
let(:params) { {:ensure => 'present', :version => '7', :java_se => 'jre'} }
let :title do 'jdk7' end
it { should contain_archive('/tmp/jre-7u80-linux-i586.rpm')}
it { should contain_exec('Install Oracle java_se jre 7').with_command('rpm --force -iv /tmp/jre-7u80-linux-i586.rpm') }
end
context 'select Oracle Java SE 8 JRE on RedHat family, 32-bit' do
let(:params) { {:ensure => 'present', :version => '8', :java_se => 'jre'} }
let :title do 'jdk8' end
it { should contain_archive('/tmp/jre-8u51-linux-i586.rpm')}
it { should contain_exec('Install Oracle java_se jre 8').with_command('rpm --force -iv /tmp/jre-8u51-linux-i586.rpm') }
end
end
describe 'incompatible OSs' do
[
{
# C14706
:osfamily => 'windows',
:operatingsystem => 'windows',
:operatingsystemrelease => '8.1',
:puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)',
},
{
# C14707
:osfamily => 'Darwin',
:operatingsystem => 'Darwin',
:operatingsystemrelease => '13.3.0',
:puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)',
},
{
# C14708
:osfamily => 'AIX',
:operatingsystem => 'AIX',
:operatingsystemrelease => '7100-02-00-000',
:puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)',
},
{
# C14708
:osfamily => 'AIX',
:operatingsystem => 'AIX',
:operatingsystemrelease => '6100-07-04-1216',
:puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)',
},
{
# C14708
:osfamily => 'AIX',
:operatingsystem => 'AIX',
:operatingsystemrelease => '5300-12-01-1016',
:puppetversion => '3.4.3 (Puppet Enterprise 3.2.3)',
},
].each do |facts|
let(:facts) { facts }
let :title do 'jdk' end
it "should fail on #{facts[:operatingsystem]} #{facts[:operatingsystemrelease]}" do
expect { catalogue }.to raise_error Puppet::Error, /unsupported platform/
end
end
end
end

View File

@@ -1,6 +1,8 @@
#This file is generated by ModuleSync, do not edit.
require 'puppetlabs_spec_helper/module_spec_helper'
RSpec.configure do |c|
# declare an exclusion filter for the tests using with_env on facter 1.6, as the function is not available on 1.6
c.filter_run_excluding :with_env => true if Facter.version =~ /^1\.6\./
# put local configuration and setup into spec_helper_local
begin
require 'spec_helper_local'
rescue LoadError
end

View File

@@ -0,0 +1,29 @@
require "spec_helper"
describe Facter::Util::Fact do
before {
Facter.clear
Facter.fact(:kernel).stubs(:value).returns('Linux')
}
describe "java_default_home" do
context 'returns java home path when readlink present' do
it do
java_path_output = <<-EOS
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
EOS
Facter::Util::Resolution.expects(:which).with("readlink").returns(true)
Facter::Util::Resolution.expects(:exec).with("readlink -e /usr/bin/java").returns(java_path_output)
Facter.value(:java_default_home).should == "/usr/lib/jvm/java-7-openjdk-amd64"
end
end
context 'returns nil when readlink not present' do
it do
Facter::Util::Resolution.stubs(:exec)
Facter::Util::Resolution.expects(:which).with("readlink").at_least(1).returns(false)
Facter.value(:java_default_home).should be_nil
end
end
end
end

View File

@@ -0,0 +1,21 @@
require "spec_helper"
describe Facter::Util::Fact do
before {
Facter.clear
Facter.fact(:kernel).stubs(:value).returns('Linux')
java_default_home = '/usr/lib/jvm/java-8-openjdk-amd64'
Facter.fact(:java_default_home).stubs(:value).returns(java_default_home)
Dir.stubs(:glob).with("#{java_default_home}/jre/lib/**/libjvm.so").returns( ['/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so'])
}
describe "java_libjvm_path" do
context 'returns libjvm path' do
context 'on Linux' do
it do
Facter.value(:java_libjvm_path).should == "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server"
end
end
end
end
end

5
tests/oracle.pp Normal file
View File

@@ -0,0 +1,5 @@
java::oracle { 'jdk6' :
ensure => 'present',
version => '6',
java_se => 'jdk',
}