Defined Type: java

Defined in:
manifests/init.pp

Overview

This module manages Java.

Actions:

Declares all other defines in the java module needed for installing Java. Currently, these consists of java::install, and java::config. If hiera defines a value for the parameter java_default_version on the target node the command update-alternatives is issued to set the default java accordingly.

Examples:

Declaring in manifest

java {'6': }

Parameters:

  • java_version (Integer) (defaults to: $title)

    the java version. Possible values at this time are 6 and 7.

  • java_default_version (Optional[Integer]) (defaults to: hiera('java::java_default_version', undef))

    the java default version. Possible values at this time are 6 and 7. If different than undef it will be used to configure the alternative system.



24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/init.pp', line 24

define java (
  Integer $java_version                   = $title,
  Optional[Integer] $java_default_version = hiera('java::java_default_version', undef)) {

  if $facts['os']['family'] == 'Debian' {
    include apt
  }
  java::install_config { $java_version:
    java_default_version => $java_default_version,
  }
}