Forge Home

java_ng

More parametrized Java installation

12,439 downloads

6,674 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 2.1.2 (latest)
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 1.0.1
  • 1.0.0
released Nov 18th 2017
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.2.0
  • , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'cesnet-java_ng', '2.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add cesnet-java_ng
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install cesnet-java_ng --version 2.1.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: java, headless, jdk, jre

Documentation

cesnet/java_ng — version 2.1.2 Nov 18th 2017

Java Headless Puppet Module - java_ng

Build Status

Table of Contents

  1. Module Description - What the module does and why it is useful
  2. Setup - The basics of getting started with java_ng
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. 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:openjdk, ppa:oracle

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, CA certificates)
  • Files:
  • ppa repository if enabled and needed (Debian, Ubuntu) + apt keys

No changes to the alternatives are done (only a switching in the package triggers).

Usage

Example: basic usage (using defaults or values from hiera)

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 8 (by selecting the PPA repository instead of preferred native OS repository)

class { '::java_ng':
  repo    => 'ppa:oracle',
  version => 8,
}

Reference

Classes

  • java_ng: Install Java
  • java_ng::install: Setup repositories and install packages
  • java_ng::params: Parameters and default values according to platform

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:openjdk', 'ppa:oracle'].

It may be array or single value.

Values:

  • native: native OS repository (mostly with OpenJDK Java)
  • ppa:openjdk: openjdk-r Ubuntu PPA repository (with the OpenJDK Java)
  • ppa:oracle: webupd8 Ubuntu PPA repository (with the Oracle Java)

#####prefer_version

Sets the heuristic to prefer Java version over the repository. Default: false.

It is used only when more Java versions and repositories are specified.

When true: the first specified version is used, if available in any repository.

When false: the repositories ordering is considered first (by default the native OS is the first).

#####set_default

Sets installed Java as default. Default: undef.

Used only with ppa:oracle.

Functions

  • java_ng_avail: Scans available Java versions and return matching version and repository

Limitations

PPA repository is permitted also on Debian, there is always used the Ubuntu 14/trusty version.

Alternatives are not touched, set_default parameter is used only with ppa:oracle repository.

Development