Version information
This version is compatible with:
- Puppet Enterprise >= 3.2.0
- Puppet >= 3.2.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'cesnet-java_ng', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Java Headless Puppet Module - java_ng
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with java_ng
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Module Description
This puppet module performs more parametrized Java installation. Various options may be specified:
- major version: 7, 8
- flavor: headless, jdk, jre
- repositories: native, ppa
By default the headless flavor is installed, default version depends on the platform (8 or 7), and native repository is preferred.
Setup
What java_ng affects
- Packages: Java (JRE/JDK, JCE policy)
- Files:
- webupd8 ppa repository if enabled and needed (Debian, Ubuntu) + apt keys
No changes to the alternatives are done (only a switching in the packages triggers).
Usage
Example: basic usage
include ::java_ng
Example: specify version and flavor
class { '::java_ng':
flavor => 'jdk',
version => 8,
}
Example: lock the package version (Debian, Ubuntu)
class { '::java_ng':
ensure => 'held',
version => 8,
}
Example: Oracle Java (using only ppa, not the native OS repository)
class { '::java_ng':
repo => 'ppa',
version => 8,
}
Reference
Classes
java_ng
: Install Javajava_ng::install
: Setup repositories and install packagesjava_ng::config
java_ng
class
Parameters
ensure
ensure parameter for the Java packages. Default: undef.
Set to held, if the Java version is held in Debian or Ubuntu.
flavor
Java flavor. Default: 'headless'.
Values:
- headless
- jdk
- jre
version
Java major version. Default: [8, 7].
It may be array or single value.
repo
Repository to use. Default: ['native', 'ppa'].
It may be array or single value.
Values:
- native: native OS repository (mostly with OpenJDK Java)
- ppa: webupd8 PPA repository (with the Oracle Java)
prefer_version
Sets the heuristics for selecting default Java version and repository. Default: false.
It is used only when more Java versions is specified.
When true: the first specified version is used, if available in any repository.
When false: the repositories ordering is considered first (native OS goes first by default).
Functions
java_ng_avail
: Construct list of Java versions
Limitations
PPA repository is permitted also on Debian, there is always used the Ubuntu 14/trusty version.
Alternatives are not touched.
Development
- Repository: https://github.com/MetaCenterCloudPuppet/cesnet-java_ng
- Tests:
- basic: see .travis.yml
- Email: František Dvořák <valtri@civ.zcu.cz>
Dependencies
- puppetlabs/apt (<3.0.0)
- puppetlabs/stdlib (>= 1.0.0 <5.0.0)
The MIT License (MIT) Copyright (c) 2015,2016 CESNET Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.