blob: ea4fb25dfc4b50bf3473ddc95ae999736e559990 [file] [log] [blame]
#--------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#--------------------------------------------------------------
# Jboss Application Server type
define jboss::as (
$bind_address = $::fqdn,
$extra_jars = [],
$group = 'jboss',
$home = '/home',
$java_home = '/usr/java/latest',
$java_opts = '',
$version = undef,
$basedir = '/mnt',
) {
$user = $title
$product = 'jboss-as'
$product_dir = "${basedir}/${product}-${version}"
jboss::user { $user: group => $group }
jboss::install { "${user}-${product}":
version => "${product}-${version}",
user => $user,
group => $group,
basedir => $basedir,
product => $product,
require => Jboss::User[$user]
}
jboss::extra_jars { $extra_jars:
product_dir => $product_dir,
destination => "${product_dir}/standalone/lib/ext",
user => $user,
require => Jboss::Install["${user}-${product}"],
}
jboss::service{ "${user}-${product}":
product => $product,
user => $user,
group => $group,
version => $version,
java_home => $java_home,
java_opts => $java_opts,
home => $home,
product_dir => $product_dir,
bind_address => $bind_address,
require => [
Jboss::Install["${user}-${product}"],
Jboss::Extra_jars[$extra_jars]
]
}
}