Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc1dd231e3 | ||
|
|
221a6d3dab | ||
|
|
7efde2db1e | ||
|
|
d93930d6e3 | ||
|
|
b3eb1642ae | ||
|
|
867f8c524a | ||
|
|
292503aaf1 | ||
|
|
ef09ed0545 | ||
|
|
ac7cdf8cce | ||
|
|
993b2e5e4c | ||
|
|
5bcc4df0c3 | ||
|
|
85a4f8fb1f | ||
|
|
46fc64b641 | ||
|
|
dddbad11a9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
pkg/
|
pkg/
|
||||||
|
.DS_Store
|
||||||
|
|||||||
15
CHANGELOG
15
CHANGELOG
@@ -1,2 +1,17 @@
|
|||||||
|
2011-05-28 Jeff McCune <jeff@puppetlabs.com> - 0.1.3
|
||||||
|
* Remove stages
|
||||||
|
|
||||||
|
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
|
2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1
|
||||||
* Initial release
|
* Initial release
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name 'puppetlabs-java'
|
name 'puppetlabs-java'
|
||||||
version '0.0.1'
|
version '0.1.3'
|
||||||
source 'git://github.com/puppetlabs/puppetlabs-java'
|
source 'git://github.com/puppetlabs/puppetlabs-java'
|
||||||
author 'puppetlabs'
|
author 'puppetlabs'
|
||||||
license 'Apache'
|
license 'Apache'
|
||||||
@@ -8,4 +8,4 @@ description 'Manage the official Java runtime'
|
|||||||
project_page 'https://github.com/puppetlabs/puppetlabs-java'
|
project_page 'https://github.com/puppetlabs/puppetlabs-java'
|
||||||
|
|
||||||
## Add dependencies, if any:
|
## 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.
|
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,30 @@
|
|||||||
#
|
#
|
||||||
# [Remember: No empty lines between comments and class definition]
|
# [Remember: No empty lines between comments and class definition]
|
||||||
class java(
|
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)
|
||||||
|
|
||||||
class { 'java::jre_package':
|
$version_real = $version
|
||||||
version => $version_real,
|
$distribution_real = $distribution
|
||||||
stage => 'runtime',
|
|
||||||
|
case $distribution_real {
|
||||||
|
jre: {
|
||||||
|
class { 'java::jre_package':
|
||||||
|
version => $version_real,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jdk: {
|
||||||
|
class { 'java::jdk_package':
|
||||||
|
version => $version_real,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
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:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
class java::jre_package (
|
class java::jre_package (
|
||||||
$version='1.6.0_25-fcs'
|
$version
|
||||||
) {
|
) {
|
||||||
# statements
|
|
||||||
|
validate_re($version, '^[._0-9a-zA-Z:-]+$')
|
||||||
|
|
||||||
|
$version_real = $version
|
||||||
|
|
||||||
package { 'jre':
|
package { 'jre':
|
||||||
ensure => $version_real,
|
ensure => $version_real,
|
||||||
alias => 'java',
|
alias => 'java',
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user