Forge Home


Install JRE without package system. This module install any jre version


10,195 latest version

1.9 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.

Version information

  • 0.0.1 (latest)
released Nov 6th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'fhuertas-jre_install', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fhuertas-jre_install
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fhuertas-jre_install --version 0.0.1

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.

Tags: java, jre


fhuertas/jre_install — version 0.0.1 Nov 6th 2013

Java JRE Installation module


Author: Francisco Huertas Ferrer

Center: Center for Open Middleware, Universidad Politecnica de Madrid

License: Apache 2.0

Version: 0.0.1

Module description

This module installs Java-JRE in a System using Puppet. This installation does not use the package system of the OS system.

This version supports Debian OS family. To support new OS families, it creates

Support to new OS families

To create support other OS families, must be performed the following steps:

  • Create a new script that creates a structure of directories. The name of the script must be mkdir-'OS Family'.sh.erb. E.g.: The fact used in the template is dir. (See for more information)
  • Create a new script that checks if the version of JDK has changed and if it has changed, it extracts the the tar file. The name of the script must be 'OS Family' E.g.: The facts used in the template are jre_filename, jre_package and java_home. (See for more information).

Module information

puppet directories:

| - hieradata # data folder
|   | - jre_module # It stores the yaml files. It must be configured in hiera.yaml and can be different
| - module # Module folder
|   | - files # It stores the files, the jre package must be in this directory
|   | - manifest # It stores the manifest, 
|   | - templates # It stores the templates. The scripts are in this directory


  • Puppet core version: >= 3.2
  • OS Family supported: Debian (Ubuntu is supported too)
  • Enable the Experimental parser for 3.2.X version.
  • Install and configure hiera. Installation guide

NOTE: How to enable experimental parser (Only for 3.2.X core version): Edit the puppet.conf file in the master node, that is in the puppet directory, and add this line parser=future in the master tag.



  • Copy the module directory in the modules folder.


  • Includes in the manifest the module definition include jre_installation or class { 'jre_installation' : }
  • Create and fill the data files: the hierarchy are defined in the heira.yaml in the puppet directory.
  • Put the jre package in the file folder. It should be in tar format

Variables description

It need to define the following variables:

  • persistent_dir: A persistent folder in the agent node
  • tmp_dir: a temporal folder in the agent node.
  • jre_filename: The name of the jre with extesions
  • installation_path: the path where the jre must be installed. E.g: /usr/lib
  • installation_directory: the folder name where the jre must be installed. E.g. jre
  • java_home: the full path of java directory /usr/lib/jre


jre_filename           : 'jre-7u40-linux-x64.tar.gz'
tmp_dir                : '/tmp'
persistent_dir         : '/var/lib/puppet'
installation_path      : &installation_path '/usr/lib'
installation_directory : &installation_directory 'jre'
java_home              :
 - *installation_path
 - '/'
 - *installation_directory