Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
017a749d13 | ||
|
|
e37f6d5af6 | ||
|
|
c797e52851 | ||
|
|
4ab58a2f88 | ||
|
|
3afa0813ea | ||
|
|
4d7154516d | ||
|
|
d027d35e2d | ||
|
|
30b07259a2 | ||
|
|
6365fcd9f2 | ||
|
|
a671ad7cc4 | ||
|
|
0e4dc2dd81 | ||
|
|
4c1161891b | ||
|
|
98e1d30235 | ||
|
|
b5854b3ef3 | ||
|
|
e6be2ed785 | ||
|
|
b547e53a8b | ||
|
|
3b674ac225 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
pkg/
|
||||
.DS_Store
|
||||
metadata.json
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
2012-11-15 Scott Schneider <sschneider@puppetlabs.com> - 0.2.0
|
||||
* Add Solaris support
|
||||
|
||||
2011-06-16 Jeff McCune <jeff@puppetlabs.com> - 0.1.5
|
||||
* Add Debian based distro (Lucid) support
|
||||
|
||||
|
||||
17
LICENSE
Normal file
17
LICENSE
Normal file
@@ -0,0 +1,17 @@
|
||||
Puppet OpenNebula Module - Puppet module for managing OpenNebula
|
||||
|
||||
Copyright (C) 2011 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.
|
||||
@@ -1,5 +1,5 @@
|
||||
name 'puppetlabs-java'
|
||||
version '0.1.5'
|
||||
version '0.2.0'
|
||||
source 'git://github.com/puppetlabs/puppetlabs-java'
|
||||
author 'puppetlabs'
|
||||
license 'Apache'
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
# [Remember: No empty lines between comments and class definition]
|
||||
class java(
|
||||
$distribution = 'jdk',
|
||||
$version = 'installed'
|
||||
$version = 'present'
|
||||
) {
|
||||
|
||||
validate_re($distribution, '^jdk$|^jre$')
|
||||
validate_re($distribution, '^jdk$|^jre$|^java.*$')
|
||||
validate_re($version, 'installed|^[._0-9a-zA-Z:-]+$')
|
||||
|
||||
anchor { 'java::begin': }
|
||||
anchor { 'java::end': }
|
||||
|
||||
case $operatingsystem {
|
||||
case $::osfamily {
|
||||
|
||||
centos, redhat, oel: {
|
||||
'RedHat': {
|
||||
|
||||
class { 'java::package_redhat':
|
||||
version => $version,
|
||||
@@ -35,12 +35,26 @@ class java(
|
||||
|
||||
}
|
||||
|
||||
debian, ubuntu: {
|
||||
'Debian': {
|
||||
|
||||
case $::lsbdistcodename {
|
||||
squeeze, lucid: {
|
||||
$distribution_debian = $distribution ? {
|
||||
jdk => 'sun-java6-jdk',
|
||||
jre => 'sun-java6-jre',
|
||||
jdk => 'openjdk-6-jdk',
|
||||
jre => 'openjdk-6-jre-headless',
|
||||
}
|
||||
}
|
||||
wheezy, precise: {
|
||||
$distribution_debian = $distribution ? {
|
||||
jdk => 'openjdk-7-jdk',
|
||||
jre => 'openjdk-7-jre-headless',
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("operatingsystem distribution ${::lsbdistcodename} is not supported")
|
||||
}
|
||||
}
|
||||
|
||||
class { 'java::package_debian':
|
||||
version => $version,
|
||||
distribution => $distribution_debian,
|
||||
@@ -50,8 +64,24 @@ class java(
|
||||
|
||||
}
|
||||
|
||||
'Solaris': {
|
||||
|
||||
$distribution_solaris = $distribution ? {
|
||||
jdk => 'developer/java/jdk-7',
|
||||
jre => 'runtime/java/jre-7',
|
||||
}
|
||||
|
||||
class { 'java::package_solaris':
|
||||
version => $version,
|
||||
distribution => $distribution_solaris,
|
||||
require => Anchor['java::begin'],
|
||||
before => Anchor['java::end'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
default: {
|
||||
fail("operatingsystem $operatingsystem is not supported")
|
||||
fail("osfamily ${::osfamily} is not supported")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,5 +24,4 @@ class java::package_debian(
|
||||
ensure => $version,
|
||||
name => $distribution,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
27
manifests/package_solaris.pp
Normal file
27
manifests/package_solaris.pp
Normal file
@@ -0,0 +1,27 @@
|
||||
# Class: java::package_solaris
|
||||
#
|
||||
# Implementation class of the Java package
|
||||
# for Solaris based systems.
|
||||
#
|
||||
# This class is not meant to be used by the end user
|
||||
# of the module. It is an implementation class
|
||||
# of the composite Class[java]
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# Actions:
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
class java::package_solaris(
|
||||
$version,
|
||||
$distribution
|
||||
) {
|
||||
|
||||
package { 'java':
|
||||
ensure => $version,
|
||||
name => $distribution,
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/*
|
||||
+-----------------------------------------------------------------------+
|
||||
| |
|
||||
| ==> DO NOT EDIT THIS FILE! <== |
|
||||
| |
|
||||
| You should edit the `Modulefile` and run `puppet-module build` |
|
||||
| to generate the `metadata.json` file for your releases. |
|
||||
| |
|
||||
+-----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
{}
|
||||
3
templates/sun-java6.preseed
Normal file
3
templates/sun-java6.preseed
Normal file
@@ -0,0 +1,3 @@
|
||||
sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
|
||||
sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true
|
||||
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
|
||||
Reference in New Issue
Block a user