Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d93930d6e3 | ||
|
|
b3eb1642ae | ||
|
|
867f8c524a | ||
|
|
292503aaf1 | ||
|
|
ef09ed0545 | ||
|
|
ac7cdf8cce | ||
|
|
993b2e5e4c | ||
|
|
5bcc4df0c3 | ||
|
|
85a4f8fb1f | ||
|
|
46fc64b641 | ||
|
|
dddbad11a9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
pkg/
|
||||
.DS_Store
|
||||
|
||||
12
CHANGELOG
12
CHANGELOG
@@ -1,2 +1,14 @@
|
||||
2011-05-26 Jeff McCune <jeff@puppetlabs.com> - 0.1.2
|
||||
* Changes JRE/JDK selection class parameter to $distribution
|
||||
|
||||
2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1
|
||||
* Re-did versioning to follow semantic versioning
|
||||
|
||||
2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 1.0.1
|
||||
* Add validation of class parameters
|
||||
|
||||
2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 1.0.0
|
||||
* Default to JDK version 6u25
|
||||
|
||||
2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1
|
||||
* Initial release
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name 'puppetlabs-java'
|
||||
version '0.0.1'
|
||||
version '0.1.2'
|
||||
source 'git://github.com/puppetlabs/puppetlabs-java'
|
||||
author 'puppetlabs'
|
||||
license 'Apache'
|
||||
@@ -8,4 +8,4 @@ description 'Manage the official Java runtime'
|
||||
project_page 'https://github.com/puppetlabs/puppetlabs-java'
|
||||
|
||||
## Add dependencies, if any:
|
||||
dependency 'puppetlabs/stdlib', '>= 0.1.2'
|
||||
dependency 'puppetlabs/stdlib', '>= 0.1.3'
|
||||
|
||||
@@ -4,3 +4,13 @@ Manage the Java runtime for use with other application software.
|
||||
|
||||
Currently this simply deploys the package on Enterprise Linux based systems.
|
||||
|
||||
The Java runtime this module is designed to configure are the RPM's provided by Oracle and obtained by extracting them from the "bin" installers.
|
||||
|
||||
For example:
|
||||
|
||||
./jdk-6u25-linux-x64-rpm.bin -x
|
||||
|
||||
Please download the installer from:
|
||||
|
||||
* [Java Downloads](http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html)
|
||||
|
||||
|
||||
@@ -12,14 +12,32 @@
|
||||
#
|
||||
# [Remember: No empty lines between comments and class definition]
|
||||
class java(
|
||||
$version='1.6.0_25-fcs'
|
||||
$distribution = 'jdk',
|
||||
$version = 'installed'
|
||||
) {
|
||||
|
||||
$version_real = $version
|
||||
# Cannot pass anonymous arrays to functions in 2.6.8
|
||||
$v_distribution = [ '^jre$', '^jdk$' ]
|
||||
# Must compare string values, not booleans.
|
||||
validate_re($version, '^[._0-9a-zA-Z:-]+$')
|
||||
validate_re($distribution, $v_distribution)
|
||||
|
||||
$version_real = $version
|
||||
$distribution_real = $distribution
|
||||
|
||||
case $distribution_real {
|
||||
jre: {
|
||||
class { 'java::jre_package':
|
||||
version => $version_real,
|
||||
stage => 'runtime',
|
||||
}
|
||||
}
|
||||
jdk: {
|
||||
class { 'java::jdk_package':
|
||||
version => $version_real,
|
||||
stage => 'runtime',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
29
manifests/jdk_package.pp
Normal file
29
manifests/jdk_package.pp
Normal file
@@ -0,0 +1,29 @@
|
||||
# Class: java:jdk_package
|
||||
#
|
||||
# This class installs the Java JDK package
|
||||
# produced from ./jdk-6u25-linux-x64-rpm.bin -x
|
||||
#
|
||||
# This is the "Official" RPM distributed by Oracle
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
class java::jdk_package (
|
||||
$version
|
||||
) {
|
||||
|
||||
validate_re($version, '^[._0-9a-zA-Z:-]+$')
|
||||
|
||||
$version_real = $version
|
||||
|
||||
package { 'jdk':
|
||||
ensure => $version_real,
|
||||
alias => 'java',
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,11 +11,16 @@
|
||||
# Sample Usage:
|
||||
#
|
||||
class java::jre_package (
|
||||
$version='1.6.0_25-fcs'
|
||||
$version
|
||||
) {
|
||||
# statements
|
||||
|
||||
validate_re($version, '^[._0-9a-zA-Z:-]+$')
|
||||
|
||||
$version_real = $version
|
||||
|
||||
package { 'jre':
|
||||
ensure => $version_real,
|
||||
alias => 'java',
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user