Installs and Manages Tomcat6

Manaaki Whenua



11,081 latest version

2.9 quality score

Version information

  • 0.1.3 (latest)
released Mar 3rd 2015
This version is compatible with:
  • Ubuntu

Start using this module


landcareresearch/tomcat6 — version 0.1.3 Mar 3rd 2015

Tomcat6 puppet module

Puppet Forge Bitbucket Build Status


This module installs, configures, and manages Apache Tomcat6. Note, uses the system's default version of java.


Note, the puppet packages below should automatically be installed if the puppet module command is used.

  • Ubuntu Operating System.
  • Depedencies listed in the Modulefile.


There is one class that needs to be declared. The class installs and manages a single instance of tomcat6. The tomcat6 class is a paramaterized class with 1 optional paramater. There is one defined type called tomcat6::app. The tomcat6::app defines a webapp to be installed into the typical webapp directory of tomcat.

Tomcat6 Optional Parameter

The parameters listed in this section can optionally be configured.


Tomcat6 static resources defined in the context.xml file. More details about the configuraiton can be found here. This variable is an array of hashes. Valid hash values defined below.

  • name
  • auth
  • type
  • driverClassName
  • url
  • username
  • password
  • maxActive
  • minIdle
  • maxIdle
  • maxWait
  • minEvictableIdleTimeMillis
  • timeBetweenEvictionRunsMillis
  • numTestsPerEvictionRun
  • poolPreparedStatements
  • maxOpenPreparedStatements
  • testOnBorrow
  • accessToUnderlyingConnectionAllowed
  • validationQuery


This section shows example uses of the tomcat6 module.

Example 1

This example demonstrates the most basic usage of the tomcat6 module. Deploys tomcat6 with the default configuration.

class {'tomcat6': }

Example 2

This example demonstrates a static resource type configured for a web app called pidsvc.

Declaring a hash for the static resource.

$tomcat_resources = {
    pidsvc => {
        'name' => 'jdbc/pidsvc',
        'auth' => 'Container',
        'type' => 'javax.sql.DataSource',
        'driverClassName' => 'org.postgresql.Driver',
        'url' => "jdbc:postgresql://$pidservice::servername:5432/pidsvc",
        'username' => "$pidservice::db_user",
        'password' => "$pidservice::db_passwd",
        'maxActive' => '-1',
        'minIdle' => '0',
        'maxIdle' => '10',
        'maxWait' => '10000',
        'minEvictableIdleTimeMillis' => '300000',
        'timeBetweenEvictionRunsMillis' => '300000',
        'numTestsPerEvictionRun' => '20',
        'poolPreparedStatements' => 'true',
        'maxOpenPreparedStatements' => '100',
        'testOnBorrow' => 'true',
        'accessToUnderlyingConnectionAllowed' => 'true',
        'validationQuery' => 'SELECT VERSION();'

Declaring tomcat6 with the resoures.

class { 'tomcat6': 
    resources => $tomcat_resources,

Declaring an app that eventually utilizes the static resource.

    war_url => '',
    jar_lib_url => '',


Only works with debian based OS's.


The module is open source and available on github. Please fork!