tomcat
: Class to manage installation and configuration of Tomcat.
tomcat::config::context
: Configure attributes for the Context element in $CATALINA_BASE/conf/context.xmltomcat::config::context::environment
: Configure Environment elements in $CATALINA_BASE/conf/context.xmltomcat::config::context::manager
: Configure Manager elements in $CATALINA_BASE/conf/context.xmltomcat::config::context::parameter
: Configure Parameter elements in $CATALINA_BASE/conf/context.xml.tomcat::config::context::resource
: Configure Resource elements in $CATALINA_BASE/conf/context.xmltomcat::config::context::resourcelink
: Configure a ResourceLink element in the designated xml config.tomcat::config::context::resources
: Configure Resources elements in $CATALINA_BASE/conf/context.xmltomcat::config::context::valve
: Specifies Valve elements in${catalina_base}/conf/context.xml
tomcat::config::properties::property
: Manage additional entries for the properties file, typically catalina.propertiestomcat::config::server
: Configure attributes for the Server element in $CATALINA_BASE/conf/server.xmltomcat::config::server::connector
: Configure Connector elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::context
: Configure a Context element in $CATALINA_BASE/conf/server.xmltomcat::config::server::engine
: Configure Engine elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::globalnamingresource
: Configure GlobalNamingResources Resource elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::host
: Configure Host elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::listener
: Configure Listener elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::realm
: Configure Realm elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::resources
: Configure Resources elements in $CATALINA_BASE/conf/server.xmltomcat::config::server::service
: Configure a Service element nested in the Server element in $CATALINA_BASE/conf/server.xmltomcat::config::server::tomcat_users
: Configures roles and users in $CATALINA_BASE/conf/tomcat-users.xml or any other specified filetomcat::config::server::valve
: Configure a Valve element in $CATALINA_BASE/conf/server.xmltomcat::install
: Configure and manage the tomcat installationtomcat::instance
: This define installs an instance of Tomcat.tomcat::service
: Service management for Tomcat.tomcat::setenv::entry
: This define adds an entry to the setenv.sh script.tomcat::war
: Manage deployment of WAR files.
tomcat::config::properties
: Manage the catalina.properties filetomcat::install::package
: Private define to install Tomcat from a package.tomcat::install::source
: Private define to install Tomcat from source.tomcat::instance::copy_from_home
: Private define to copy a conf file from catalina_home to catalina_basetomcat::instance::dependencies
tomcat::change
: This function exists for usage of a returning the input params that is a deferred function Will be used for deferring the values at agent lev
Class to manage installation and configuration of Tomcat.
The following parameters are available in the tomcat
class:
catalina_home
user
group
purge_connectors
purge_realms
manage_user
manage_group
manage_home
manage_base
manage_properties
Data type: String
Specifies the default root directory of the Tomcat installation. Valid options: a string containing an absolute path.
Default value: '/opt/apache-tomcat'
Data type: String[1]
Specifies a default user to run Tomcat as. Valid options: a string containing a valid username.
Default value: 'tomcat'
Data type: String[1]
Specifies a default group to run Tomcat as. Valid options: a string containing a valid group name.
Default value: 'tomcat'
Data type: Boolean
Specifies whether to purge any unmanaged Connector elements that match defined protocol but have a different port from the configuration file by default.
Default value: false
Data type: Boolean
Specifies whether to purge any unmanaged realm elements from the configuration file by default. If two realms are defined for a specific server config only use purge_realms
for the first realm and ensure the realms enforce a strict order between each other.
Default value: false
Data type: Boolean
Determines whether defined types should default to creating the specified user, if it doesn't exist. Uses Puppet's native user with default parameters.
Default value: true
Data type: Boolean
Determines whether defined types should default to creating the specified group, if it doesn't exist. Uses Puppet's native group with default parameters.
Default value: true
Data type: Boolean
Specifies the default value of manage_home
for all tomcat::instance
instances.
Default value: true
Data type: Boolean
Specifies the default value of manage_base
for all tomcat::install
instances.
Default value: true
Data type: Boolean
Specifies the default value of manage_properties
for all tomcat::instance
instances.
Default value: true
Configure attributes for the Context element in $CATALINA_BASE/conf/context.xml
The following parameters are available in the tomcat::config::context
defined type:
Data type: Optional[Stdlib::Absolutepath]
Specifies the root of the Tomcat installation.
Default value: undef
Data type: Hash
Specifies any additional attributes to add to the Context. Should be a hash of the format 'attribute' => 'value'. Optional
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings. []
.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Environment elements in $CATALINA_BASE/conf/context.xml
The following parameters are available in the tomcat::config::context::environment
defined type:
ensure
catalina_base
environment_name
name
type
value
description
override
additional_attributes
attributes_to_remove
show_diff
Data type: Enum['present','absent']
Specifies whether you are trying to add or remove the Environment element Valid options: 'present', 'absent'.
Default value: 'present'
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation.
Default value: $tomcat::catalina_home
Data type: String[1]
The name of the Environment Entry to be created, relative to the java:comp/env
context. $name
.
Default value: $name
$environment_name
Data type: Optional[String[1]]
The fully qualified Java class name expected by the web application for this environment entry. Required to create the environment entry.
Default value: undef
Data type: Optional[String[1]]
The value that will be presented to the application when requested from the JNDI context. Required to create the environment entry.
Default value: undef
Data type: Optional[String[1]]
The description is an an optional string for a human-readable description of this environment entry.
Default value: undef
Data type: Optional[Boolean]
An optional string or Boolean to specify if you do not want an <env-entry>
for the same environment entry name to override the value specified here (set it to false
). By default, overrides are allowed.
Default value: undef
Data type: Hash
Specifies any additional attributes to add to the Environment. Should be a hash of the format 'attribute' => 'value'.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Manager elements in $CATALINA_BASE/conf/context.xml
The following parameters are available in the tomcat::config::context::manager
defined type:
Data type: Enum['present','absent']
specifies whether you are trying to add or remove the Manager element.
Default value: 'present'
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation.
Default value: $tomcat::catalina_home
Data type: String[1]
The name of the Manager to be created. $name
.
Default value: $name
$manager_classname
Data type: Hash
Specifies any additional attributes to add to the Manager. Should be a hash of the format 'attribute' => 'value'. Optional
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings. []
.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Parameter elements in $CATALINA_BASE/conf/context.xml.
The following parameters are available in the tomcat::config::context::parameter
defined type:
Data type: Enum['present', 'absent']
Specifies whether you are trying to add or remove the Parameter element Valid options: 'present', 'absent'.
Default value: 'present'
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation.
Default value: $tomcat::catalina_home
Data type: String[1]
The name of the Parameter entry to be created, relative to the java:comp/env
context. $name
.
Default value: $name
Data type: Optional[String[1]]
The value that will be presented to the application when requested from the JNDI context.
Default value: undef
Data type: Optional[String[1]]
The description is an an optional string for a human-readable description of this Parameter entry.
Default value: undef
Data type: Optional[Boolean]
An optional string or Boolean to specify whether you want an <env-entry>
for the same Parameter entry name to override the value
specified here (set it to false
). By default, overrides are allowed.
Default value: undef
Configure Resource elements in $CATALINA_BASE/conf/context.xml
The following parameters are available in the tomcat::config::context::resource
defined type:
ensure
resource_name
name
resource_type
catalina_base
additional_attributes
attributes_to_remove
show_diff
Data type: Enum['present','absent']
Specifies whether you are trying to add or remove the Resource element.
Default value: 'present'
Data type: String[1]
The name of the Resource to be created, relative to the java:comp/env
context. $name
.
Default value: $name
$resource_name
Data type: Optional[String[1]]
The fully qualified Java class name expected by the web application when it performs a lookup for this resource. Required to create the resource.
Default value: undef
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation.
Default value: $tomcat::catalina_home
Data type: Hash
Specifies any additional attributes to add to the Valve. Should be a hash of the format 'attribute' => 'value'. Optional
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings. []
.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure a ResourceLink element in the designated xml config.
The following parameters are available in the tomcat::config::context::resourcelink
defined type:
ensure
catalina_base
resourcelink_name
name
resourcelink_type
additional_attributes
attributes_to_remove
show_diff
Data type: Enum['present','absent']
specifies whether you are trying to add or remove the ResourceLink element.
Default value: 'present'
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation. $tomcat::catalina_home
.
Default value: $tomcat::catalina_home
Data type: String[1]
The name of the ResourceLink to be created, relative to the java:comp/env
context. $name
.
Default value: $name
$resourcelink_name
Data type: Optional[String[1]]
The fully qualified Java class name expected by the web application when it performs a lookup for this resource link.
Default value: undef
Data type: Hash
Specifies any additional attributes to add to the Valve. Should be a hash of the format 'attribute' => 'value'. Optional
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings. []
.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Resources elements in $CATALINA_BASE/conf/context.xml
The following parameters are available in the tomcat::config::context::resources
defined type:
Data type: Enum['present','absent']
Specifies whether you are trying to add or remove the Resources element.
Default value: 'present'
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation.
Default value: $tomcat::catalina_home
Data type: Hash
Specifies any additional attributes to add to the Valve. Should be a hash of the format 'attribute' => 'value'. Optional
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings. []
.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Specifies Valve elements in ${catalina_base}/conf/context.xml
The following parameters are available in the tomcat::config::context::valve
defined type:
ensure
resource_name
resource_type
class_name
catalina_base
additional_attributes
attributes_to_remove
uniqueness_attributes
show_diff
Data type: Enum['present','absent']
Specifies whether you are trying to add or remove the Valve element.
Default value: 'present'
Data type: Optional[String[1]]
Deprecated! Use uniqueness_attributes
.
The name of the Resource to be created. Default: $name
if resource_type
is used.
Using this parameter will add an extra name
attribute on the valve
element.
As Tomcat allows multiple valves of the same className, this parameter has been used to create
unique representations of each element.
Adding a name
attribute to a valve produces a warning in tomcat during load.
Default value: undef
Data type: Optional[String[1]]
Deprecated! Use class_name
Java class name of the implementation to use.
Default value: undef
Data type: Optional[String[1]]
Java class name of the implementation to use. Default: $name
if resource_type
is not used.
Default value: undef
Data type: Stdlib::Absolutepath
Specifies the root of the Tomcat installation. Default: $tomcat::catalina_home
Default value: $tomcat::catalina_home
Data type: Hash
Specifies any further attributes to add to the Valve. Valid options: a hash of '< attribute >' => '< value >' pairs. {}
.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings. []
.
Default value: []
Data type: Array
Specifies an array of attribute names that Puppet use to uniquely idetify valves. Valid options: an array of strings. ['className']
.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Manage additional entries for the properties file, typically catalina.properties
The following parameters are available in the tomcat::config::properties::property
defined type:
Data type: Stdlib::Absolutepath
The catalina base of the catalina.properties file. The resource will manage the values in ${catalina_base}/conf/catalina.properties
. Required
Data type: String[1]
The value of the property. Required
Data type: String[1]
The name of the property. $name
.
Default value: $name
Configure attributes for the Server element in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server
defined type:
catalina_base
class_name
class_name_ensure
address
address_ensure
port
shutdown
server_config
show_diff
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[String[1]]
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute in the configuration file. Valid options: a string containing a Java class name.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the className XML attribute should exist in the configuration file.
Default value: 'present'
Data type: Optional[Variant[Pattern[/^localhost$/], Stdlib::IP::Address]]
Specifies a TCP/IP address on which to listen for the shutdown command. Maps to the address XML attribute. Valid options: a string.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the address XML attribute should exist in the configuration file.
Default value: 'present'
Data type: Optional[Variant[String[1], Stdlib::Port]]
Specifies a port on which to listen for the designated shutdown command. Maps to the port XML attribute. Valid options: a string containing a port number.
Default value: undef
Data type: Optional[String[1]]
Designates a command that shuts down Tomcat when the command is received through the specified address and port. Maps to the shutdown XML attribute. Valid options: a string.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Connector elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::connector
defined type:
catalina_base
connector_ensure
port
protocol
name
parent_service
additional_attributes
attributes_to_remove
purge_connectors
server_config
show_diff
cert_key_file
cert_file
cert_chain_file
cert_type
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the Connector XML element should exist in the configuration file.
Default value: 'present'
Data type: Optional[Variant[String[1], Stdlib::Port]]
Sets a TCP port on which to create a server socket. Maps to the port XML attribute. Valid options: a string.
Default value: undef
Data type: String[1]
Specifies a protocol to use for handling incoming traffic. Maps to the protocol XML attribute. Valid options: a string. $name
.
Default value: $name
$protocol
Data type: String[1]
Specifies which Service element the Connector should nest under. Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'
Data type: Hash
Specifies any further attributes to add to the Connector. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Boolean]
Specifies whether to purge any unmanaged Connector elements that match defined protocol but have a different port from the configuration file.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Data type: Optional[Stdlib::Absolutepath]
Specifies the path to the private key file. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the path to the certificate file. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the path to the certificate chain file. Valid options: a string containing an absolute path.
Default value: undef
Data type: String[1]
Specifies the type of certificate. Valid options: a string. 'RSA'.
Default value: 'RSA'
Configure a Context element in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::context
defined type:
catalina_base
context_ensure
doc_base
parent_service
parent_engine
parent_host
additional_attributes
attributes_to_remove
server_config
show_diff
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the Context XML element should exist in the configuration file.
Default value: 'present'
Data type: Optional[String[1]]
Specifies a Document Base (or Context Root) directory or archive file. Maps to the docBase XML attribute. Valid options: a string containing a path (either an absolute path or a path relative to the appBase directory of the owning Host). $name
.
Default value: undef
Data type: Optional[String[1]]
Specifies which Service XML element the Context should nest under. Valid options: a string containing the name attribute of the Service.
Default value: undef
Data type: Optional[String[1]]
Specifies which Engine element the Context should nest under. Only valid if parent_host
is specified. Valid options: a string containing the name attribute of the Engine.
Default value: undef
Data type: Optional[String[1]]
Specifies which Host element the Context should nest under. Valid options: a string containing the name attribute of the Host.
Default value: undef
Data type: Hash
Specifies any further attributes to add to the Context. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Engine elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::engine
defined type:
default_host
catalina_base
background_processor_delay
background_processor_delay_ensure
class_name
class_name_ensure
engine_name
jvm_route
jvm_route_ensure
parent_service
start_stop_threads
start_stop_threads_ensure
server_config
show_diff
Data type: String[1]
Specifies a host to handle any requests directed to hostnames that exist on the server but are not defined in this configuration file. Maps to the defaultHost XML attribute of the Engine. Valid options: a string containing a hostname.
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[Variant[Integer, String[1]]]
Determines the delay between invoking the backgroundProcess method on this engine and its child containers. Maps to the backgroundProcessorDelay XML attribute. Valid options: an integer, in seconds. undef
.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the backgroundProcessorDelay XML attribute should exist in the configuration file.
Default value: 'present'
Data type: Optional[String[1]]
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute. Valid options: a string containing a Java class name.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the className XML attribute should exist in the configuration file.
Default value: 'present'
Data type: Optional[String[1]]
Specifies the logical name of the Engine, used in log and error messages. Maps to the name XML attribute. Valid options: a string. name
passed in your defined type.
Default value: undef
Data type: Optional[String[1]]
Specifies an identifier to enable session affinity in load balancing. Maps to the jvmRoute XML attribute. Valid options: string.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the jvmRoute XML attribute should exist in the configuration file.
Default value: 'present'
Data type: String[1]
Specifies which Service element the Engine should nest under. Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'
Data type: Optional[Variant[String[1], Integer]]
Sets how many threads the Engine should use to start child Host elements in parallel. Maps to the startStopThreads XML attribute. Valid options: a string or an integer. Warning: Future versions of the module will deprecate Strings as a valid value and allow only Integers.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the startStopThreads XML attribute should exist in the configuration file.
Default value: 'present'
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure GlobalNamingResources Resource elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::globalnamingresource
defined type:
catalina_base
resource_name
type
ensure
additional_attributes
attributes_to_remove
server_config
show_diff
Data type: Stdlib::Absolutepath
Specifies the base directory of the Tomcat instance. Valid options: a string containing an absolute path.
Default value: $tomcat::catalina_home
Data type: Optional[String[1]]
Optionally override the globalnamingresource name that is normally taken from the Puppet resource's $name
.
Default value: undef
Data type: String[1]
Specifies the type of element to create Valid options: Resource
, Environment
or any other valid node.
Default value: 'Resource'
Data type: Enum['present','absent']
Determines whether the specified XML element should exist in the configuration file.
Default value: 'present'
Data type: Hash
Specifies any further attributes to add to the Host. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Host elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::host
defined type:
app_base
catalina_base
host_ensure
host_name
parent_service
additional_attributes
attributes_to_remove
server_config
aliases
show_diff
Data type: Optional[String[1]]
Specifies the Application Base directory for the virtual host. Maps to the appBase XML attribute. Valid options: a string.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the virtual host (the Host XML element) should exist in the configuration file.
Default value: 'present'
Data type: Optional[String[1]]
Specifies the network name of the virtual host, as registered on your DNS server. Maps to the name XML attribute. Valid options: a string.
Default value: undef
Data type: String
Specifies which Service element the Host should nest under. Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'
Data type: Hash
Specifies any further attributes to add to the Host. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[Array]
Optional array that specifies the list of Host Name Aliases for this particular Host. If omitted, any currently-defined Aliases will not be altered. If present, the list Aliases will be set to exactly match the contents of this array. Thus, for example, an empty array can be used to explicitly force there to be no Aliases for the Host.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Listener elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::listener
defined type:
catalina_base
listener_ensure
class_name
parent_service
parent_engine
parent_host
additional_attributes
attributes_to_remove
server_config
show_diff
Data type: Stdlib::Absolutepath
Specifies the base directory of the Tomcat installation. Valid options: a string containing an absolute path.
Default value: $tomcat::catalina_home
Data type: Enum['present','absent']
Specifies whether the Listener XML element should exist in the configuration file.
Default value: 'present'
Data type: Optional[String[1]]
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute of a Listener Element. Valid options: a string containing a Java class name. $name
.
Default value: undef
Data type: Optional[String[1]]
Specifies which Service element the Listener should nest under. Only valid if parent_engine
or parent_host
is specified. Valid options: a string containing the name attribute of the Service.
Default value: undef
Data type: Optional[String[1]]
Specifies which Engine element this Listener should nest under. Valid options: a string containing the name attribute of the Engine.
Default value: undef
Data type: Optional[String[1]]
Specifies which Host element this Listener should nest under. Valid options: a string containing the name attribute of the Host.
Default value: undef
Data type: Hash
Specifies any further attributes to add to the Listener. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Realm elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::realm
defined type:
catalina_base
class_name
name
realm_ensure
parent_service
parent_engine
parent_host
parent_realm
additional_attributes
attributes_to_remove
purge_realms
server_config
show_diff
Data type: Optional[String[1]]
Specifies the base directory of the Tomcat installation.
Default value: undef
Data type: String[1]
Specifies the Java class name of a Realm implementation to use. Maps to the className XML attribute. Valid options: a string containing a Java class name. name
passed in your defined type.
Default value: $name
$class_name
Data type: Enum['present','absent']
Specifies whether the Realm element should exist in the configuration file.
Default value: 'present'
Data type: String
Specifies which Service element this Realm element should nest under. Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'
Data type: String
Specifies which Engine element this Realm should nest under. Valid options: a string containing the name attribute of the Engine.
Default value: 'Catalina'
Data type: Optional[String[1]]
Specifies which Host element this Realm should nest under. Valid options: a string containing the name attribute of the Host.
Default value: undef
Data type: Optional[String[1]]
Specifies which Realm element this Realm should nest under. Valid options: a string containing the className attribute of the Realm element.
Default value: undef
Data type: Hash
Specifies any further attributes to add to the Realm element. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Boolean]
Specifies whether to purge any unmanaged Realm elements from the configuration file.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure Resources elements in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::resources
defined type:
catalina_base
resources_ensure
parent_service
parent_engine
parent_host
parent_context
additional_attributes
attributes_to_remove
server_config
show_diff
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the resources (The Resources Component) should exist in the configuration file.
Default value: 'present'
Data type: Optional[String[1]]
Specifies which Service element the Host should nest under. Valid options: a string containing the name attribute of the Service.
Default value: undef
Data type: Optional[String[1]]
Specifies which Engine element the Context should nest under. Only valid if parent_host
is specified. Valid options: a string containing the name attribute of the Engine.
Default value: undef
Data type: Optional[String[1]]
Specifies which Host element the Context should nest under. Valid options: a string containing the name attribute of the Host.
Default value: undef
Data type: Optional[String[1]]
Specifies which Context element the Context should nest under. Valid options: a string containing the name attribute of the Context.
Default value: undef
Data type: Hash
Specifies any further attributes to add to the Host. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array[String[1]]
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure a Service element nested in the Server element in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::service
defined type:
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[String[1]]
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute. Valid options: a string containing a Java class name.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the className XML attribute should exist in the configuration file.
Default value: 'present'
Data type: Enum['present','absent']
Specifies whether the Service element should exist in the configuration file.
Default value: 'present'
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configures roles and users in $CATALINA_BASE/conf/tomcat-users.xml or any other specified file
The following parameters are available in the tomcat::config::server::tomcat_users
defined type:
Data type: Stdlib::Absolutepath
Specifies the base directory of the Tomcat installation. Valid options: a string containing an absolute path.
Default value: $tomcat::catalina_home
Data type: Enum['user','role']
Specifies the type of element to manage.
Default value: 'user'
Data type: Optional[String[1]]
Sets the element's username (or rolename, if element
is set to 'role'). Valid options: a string. $name
.
Default value: undef
Data type: Enum['present','absent']
Determines whether the specified XML element should exist in the configuration file.
Default value: present
Data type: Optional[String[1]]
Specifies the configuration file to manage. Valid options: a string containing a fully-qualified path.
Default value: undef
Data type: Boolean
Specifies whether to create the specified configuration file if it doesn't exist. Uses Puppet's native file with default parameters.
Default value: true
Data type: Optional[String[1]]
Specifies the owner of the configuration file. $::tomcat::user
.
Default value: undef
Data type: Optional[String[1]]
Specifies the group of the configuration file. $::tomcat::group
.
Default value: undef
Data type: Optional[Variant[String, Sensitive[String]]]
Specifies a password for user elements. Valid options: a string.
Default value: undef
Data type: Array
Specifies one or more roles. Only valid if element
is set to 'role' or 'user'. Valid options: an array of strings.
Default value: []
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure a Valve element in $CATALINA_BASE/conf/server.xml
The following parameters are available in the tomcat::config::server::valve
defined type:
catalina_base
class_name
parent_host
parent_service
parent_context
valve_ensure
additional_attributes
attributes_to_remove
uniqueness_attributes
server_config
show_diff
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation. Valid options: a string containing an absolute path. $::tomcat::catalina_home
.
Default value: undef
Data type: Optional[String[1]]
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute. Valid options: a string containing a Java class name.
Default value: undef
Data type: Optional[String[1]]
Specifies which virtual host the Valve should nest under. Valid options: a string containing the name of a Host element.
Default value: undef
Data type: String
Specifies which Service element the Valve should nest under. Valid options: a string containing the name of a Service element.
Default value: 'Catalina'
Data type: Optional[String[1]]
Specifies which Context element the Valve should nest under. Valid options: a string containing the name of a Context element (matching the docbase attribute).
Default value: undef
Data type: Enum['present','absent']
Specifies whether the Valve should exist in the configuration file. Maps to the Valve XML element.
Default value: 'present'
Data type: Hash
Specifies any further attributes to add to the Valve. Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
Data type: Array
Specifies an array of attributes to remove from the element. Valid options: an array of strings.
Default value: []
Data type: Array
Specifies an array of attribute names that Pupet use to uniquely idetify valves. Valid options: an array of strings. ['className']
.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Specifies a server.xml file to manage. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies display differences when augeas changes files, defaulting to true. Valid options: true or false.
Default value: true
Configure and manage the tomcat installation
The following parameters are available in the tomcat::install
defined type:
catalina_home
name
install_from_source
source_url
source_strip_first_dir
proxy_type
proxy_server
allow_insecure
user
group
manage_user
manage_group
manage_home
package_ensure
package_name
package_options
remove_default_webapps
Data type: Stdlib::Absolutepath
specifies the directory of the Tomcat installation from which the instance should be created. Valid options: a string containing an absolute path.
Default value: $name
$catalina_home
Data type: Boolean
Specifies whether to install from source or from a package. If set to true
installation uses the source_url
, source_strip_first_dir
, user
, group
, manage_user
, and manage_group
parameters. If set to false
installation uses the package_ensure
, package_name
, and package_options
parameters. Valid options: Boolean. true
.
Default value: true
Data type: Optional[String[1]]
In single-instance mode: Specifies the source URL to install from. Valid options: a string containing a puppet://
, http(s)://
, or ftp://
URL.
Default value: undef
Data type: Boolean
Specifies whether to strip the topmost directory of the tarball when unpacking it. Only valid if install_from_source
is set to true
.
Default value: true
Data type:
Optional[
Enum[
'none',
'http',
'https',
'ftp'
]
]
Specifies the proxy server type used by proxy_server
. Normally this defaults to the protocol specified in the proxy_server
URI. proxy_server
. Valid options: 'none', 'http', 'https', 'ftp'.
Default value: undef
Data type: Optional[String[1]]
Specifies a proxy server to use when downloading Tomcat binaries. For example, 'https://example.com:8080'.
Default value: undef
Data type: Boolean
Specifies if HTTPS errors should be ignored when downloading the source tarball. Valid options: Boolean.
Default value: false
Data type: Optional[String[1]]
Specifies the owner of the source installation directory. $::tomcat::user
.
Default value: undef
Data type: Optional[String[1]]
Specifies the group of the source installation directory. $::tomcat::group
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether the user should be managed by this module or not. $::tomcat::manage_user
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether the group should be managed by this module or not. $::tomcat::manage_group
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether the directory of catalina_home should be managed by puppet. This may not be preferable in network filesystem environments.
Default value: undef
Data type: Optional[String[1]]
Determines whether the specified package should be installed. Only valid if install_from_source
is set to false
. Maps to the ensure
parameter of Puppet's native package.
Default value: undef
Data type: Optional[String[1]]
Specifies the package to install. Valid options: a string containing a valid package name.
Default value: undef
Data type: Optional[Array[String[1]]]
Specify additional options to use on the generated package resource. See the documentation of the package for possible values.
Default value: undef
Data type: Optional[Array[String[1]]]
Specifies the default webapps to be removed.
Default value: undef
This define installs an instance of Tomcat.
The following parameters are available in the tomcat::instance
defined type:
catalina_home
catalina_base
user
group
manage_user
manage_group
manage_service
manage_base
manage_properties
java_home
use_jsvc
use_init
manage_dirs
dir_list
dir_mode
manage_copy_from_home
copy_from_home_list
copy_from_home_mode
service_name
install_from_source
source_url
source_strip_first_dir
package_ensure
package_name
package_options
Data type: Optional[String[1]]
Specifies the directory where the Apache Tomcat software is installed by a tomcat::install
resource. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the $CATALINA_BASE
of the Tomcat instance where logs, configuration files, and the 'webapps' directory are managed. For single-instance installs, this is the same as the catalina_home
parameter Valid options: a string containing an absolute path. $catalina_home
.
Default value: undef
Data type: Optional[String[1]]
Specifies the owner of the instance directories and files. $::tomcat::user
.
Default value: undef
Data type: Optional[String[1]]
Specifies the group of the instance directories and files. $::tomcat::group
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether the user should be managed by this module or not. $::tomcat::manage_user
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether the group should be managed by this module or not. $::tomcat::manage_group
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether a tomcat::service
corresponding to this instance should be declared. Valid options: Boolean true
(multi-instance installs), false
()single-instance installs).
Default value: undef
Data type: Optional[Boolean]
Specifies whether the directory of catalina_base should be managed by Puppet. This might not be preferable in network filesystem environments. true
.
Default value: undef
Data type: Optional[Boolean]
Specifies whether the catalina.properties
file is created and managed. If true
, custom modifications to this file will be overwritten during runs Valid options: Boolean true
.
Default value: undef
Data type: Optional[String[1]]
Specifies the java home to be used when declaring a tomcat::service
instance. See [tomcat::service](# tomcatservice)
Default value: undef
Data type: Optional[Boolean]
Specifies whether jsvc should be used when declaring a tomcat::service
instance.
Default value: undef
Data type: Optional[Boolean]
Specifies whether an init script should be managed when declaring a tomcat::service
instance. See [tomcat::service](# tomcatservice)
Default value: undef
Data type: Boolean
Determines whether subdirectories for catalina_base
should be managed as part of tomcat::instance. The default directories are listed in dir_list
. Valid options: Boolean.
Default value: true
Data type: Array[String[1]]
Specifies the subdirectories under catalina_base
to be managed for an instance (disabled via manage_dirs
Boolean). Valid options: an array of strings, each being a relative subdirectory to catalina_base
. ['bin','conf','lib','logs','temp','webapps','work']
.
Default value: ['bin','conf','lib','logs','temp','webapps','work']
Data type: String[1]
Specifies a mode for the managed subdirectories under catalina_base
for an instance (as specified in dir_list
and disabled via manage_dirs
Boolean). Valid option: a string containing a standard Linux mode.
Default value: '2770'
Data type: Boolean
Specifies whether to copy the initial config files from catalina_home
to catalina_base
. Valid options: Boolean. true
.
Default value: true
Data type: Optional[Variant[Array[String[1]], String[1]]]
Specifies the full path of config files to copy from catalina_home
to catalina_base
for an instance (disabled via manage_copy_from_home
Boolean). Valid options: array of strings containing path + filename.
[ '${_catalina_base}/conf/catalina.policy',
'${_catalina_base}/conf/context.xml',
'${_catalina_base}/conf/logging.properties',
'${_catalina_base}/conf/server.xml',
'${_catalina_base}/conf/web.xml']
Default value: undef
Data type: String[1]
Specifies the file mode when copying the initial config files from catalina_home
to catalina_base
. Valid options: a string containing a standard Linux mode.
Default value: '0660'
Data type: Optional[String[1]]
Name of the service when managing the service
Default value: undef
Data type: Optional[Boolean]
Specifies whether or not the instance should be installed from source.
Default value: undef
Data type: Optional[String[1]]
URL to install from.
Default value: undef
Data type: Optional[Boolean]
Whether or not to strip the first directory when unpacking the source tarball. Defaults to true when installing from source. Requires puppet/archive.
Default value: undef
Data type: Optional[String[1]]
Ensure for the package resource when installing from package.
Default value: undef
Data type: Optional[String[1]]
Name of package when installing from package.
Default value: undef
Data type: Optional[Array[String[1]]]
Extra options to pass to the package resource.
Default value: undef
Service management for Tomcat.
The following parameters are available in the tomcat::service
defined type:
catalina_home
catalina_base
use_jsvc
use_init
java_home
service_ensure
service_enable
service_name
start_command
stop_command
status_command
user
wait_timeout
Data type: Optional[String[1]]
Specifies the root directory of the Tomcat installation. Valid options: a string containing an absolute path.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation. Valid options: a string containing an absolute path.
Default value: undef
Data type: Boolean
Specifies whether to use Jsvc for service management. If both use_jsvc
and use_init
are set to false
, tomcat uses the following commands for service management.
$CATALINA_HOME/bin/catalina.sh start
$CATALINA_HOME/bin/catalina.sh stop
Default value: false
Data type: Boolean
Specifies whether to use a package-provided init script for service management.
Default value: false
Data type: Optional[String[1]]
Specifies where Java is installed. Only applies if use_jsvc
is set to true
. Valid options: a string containing an absolute path.
Default value: undef
Data type: Enum['running', 'stopped', 'true', 'false']
Specifies whether the Tomcat service should be running. Maps to the ensure
parameter of Puppet's native service. Valid options: 'running', 'stopped', true
, false
.
Default value: running
Data type: Optional[Boolean]
Specifies whether to enable the Tomcat service at boot. Only valid if use_init
is set to true
. true
, if use_init
is set to true
and service_ensure
is set to 'running' or true
.
Default value: undef
Data type: Optional[String[1]]
Specifies the name of the Tomcat service. Valid options: a string.
Default value: undef
Data type: Optional[String[1]]
Designates a command to start the service. Valid options: a string. use_init
and use_jsvc
.
Default value: undef
Data type: Optional[String[1]]
Designates a command to stop the service. Valid options: a string. use_init
and use_jsvc
.
Default value: undef
Data type: Optional[String[1]]
Designates a command to get the status of the service. Valid options: a string. use_init
and use_jsvc
.
Default value: undef
Data type: Optional[String[1]]
The user of the jsvc process when use_init => true
Default value: undef
Data type: Integer
The wait timeout set in the jsvc init script when use_init => true
and use_jsvc => true
Default value: 10
This define adds an entry to the setenv.sh script.
The following parameters are available in the tomcat::setenv::entry
defined type:
Data type: Variant[String[1], Array[String[1]]]
Provides the value(s) of the managed parameter. Valid options: a string or an array. If passing an array, separate values with a single space.
Data type: Enum['present', 'absent']
Determines whether the fragment should exist in the configuration file. Valid options: 'present', 'absent'.
Default value: 'present'
Data type: Optional[String[1]]
Root of the Tomcat installation.
Default value: undef
Data type: Optional[String[1]]
Specifies the configuration file to edit. Valid options: a string containing an absolute path.
Default value: undef
Data type: String[1]
Specifies a parameter to manage. Valid options: a string. name
passed in your defined type.
Default value: $name
$param
Data type: Optional[String[1]]
Specifies a character to include before and after the specified value. Valid options: a string (usually a single or double quote).
Default value: undef
Data type: Variant[String[1], Integer]
Determines the ordering of your parameters in the configuration file (parameters with lower order
values appear first.) Valid options: an integer or a string containing an integer. 10
.
Default value: '10'
Data type: Optional[String[1]]
Default value: undef
Data type: Boolean
Specifies if you want to append export to the entry. Valid options: Boolean
Default value: true
Data type: Optional[String[1]]
Specifies the owner of the config file. $::tomcat::user
.
Default value: undef
Data type: Optional[String[1]]
Specifies the group of the config file. $::tomcat::group
.
Default value: undef
Manage deployment of WAR files.
The following parameters are available in the tomcat::war
defined type:
catalina_base
app_base
deployment_path
war_ensure
war_name
war_purge
war_source
allow_insecure
user
group
Data type: Optional[Stdlib::Absolutepath]
Specifies the base directory of the Tomcat installation. Valid options: a string containing an absolute path. $::tomcat::catalina_home
.
Default value: undef
Data type: Optional[String[1]]
Specifies where to deploy the WAR. Cannot be used in combination with deployment_path
. Valid options: a string containing a path relative to $CATALINA_BASE
. app_base
, Puppet deploys the WAR to your specified deployment_path
. If you don't specify that either, the WAR deploys to ${catalina_base}/webapps
.
Default value: undef
Data type: Optional[String[1]]
Specifies where to deploy the WAR. Cannot be used in combination with app_base
. Valid options: a string containing an absolute path. deployment_path
, Puppet deploys the WAR to your specified app_base
. If you don't specify that either, the WAR deploys to ${catalina_base}/webapps
.
Default value: undef
Data type: Enum['present','absent']
Specifies whether the WAR should exist.
Default value: 'present'
Data type: Optional[String[1]]
Specifies the name of the WAR. Valid options: a string containing a filename that ends in '.war'. name
passed in your defined type.
Default value: undef
Data type: Boolean
Specifies whether to purge the exploded WAR directory. Only applicable when war_ensure
is set to 'absent' or false
.
Default value: true
Data type: Optional[String[1]]
Specifies the source to deploy the WAR from. Valid options: a string containing a puppet://
, http(s)://
, or ftp://
URL.
Default value: undef
Data type: Boolean
Specifies if HTTPS errors should be ignored when downloading the war tarball.
Default value: false
Data type: String[1]
The 'owner' of the tomcat war file.
Default value: 'tomcat'
Data type: String[1]
The 'group' owner of the tomcat war file.
Default value: 'tomcat'
Type: Ruby 4.x API
This function exists for usage of a returning the input params that is a deferred function Will be used for deferring the values at agent level
This function exists for usage of a returning the input params that is a deferred function Will be used for deferring the values at agent level
Returns: Any
Data type: Any