diff --git a/README.md b/README.md index bbca753e..03a1c813 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ * [Logging](#logging) * [Modcluster](#modcluster) * [JGroups](#jgroups) + * [Systemd Custom Config](#systemd-custom-config) 6. [Limitations - OS compatibility, etc.](#limitations) 7. [Development - Guide for contributing to the module](#development) 8. [Documentation](#documentation) @@ -827,6 +828,15 @@ wildfly::jgroups::stack::tcpping { 'TCPPING': } ``` +### Systemd Custom Config +To add additional variables to the systemd EnvironmentFile by hiera: +```puppet +wildfly::custom_config: + - "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sap/jco/sap_jco_3.0.16_64:/opt/oracle/instantclient_11_2/lib" + - "NLS_LANG=GERMAN_GERMANY.WE8ISO8859P15" + - "LANG=de_DE@euro" +``` + ## Limitations Some of this module public defined types (`widfly::datasources`, `wildfly::messaging`, `wildfly::undertow`, etc) were built for Wildfly 8.x and may not work with other versions. When there is a proven alternative for a different version, examples might be provided, otherwise you'll need to build your own abstraction using `wildfly_resource` or `wildfly::resource`. diff --git a/manifests/init.pp b/manifests/init.pp index 28e588fe..e47f0966 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -42,6 +42,7 @@ # @param service_enable Sets Wildfly's service 'enable'. # @param service_file Sets a file to be used for service management. # @param service_name Sets Wildfly's service 'name'. +# @param custom_config Set custom variables to the EnvironmentFile. # @param service_manage Reload Wildfly's service when changed config. # @param shutdown_wait Sets the time to wait for the process to be shutdown - sysvinit scripts only. # @param startup_wait Sets the time to wait for the process to be up - sysvinit scripts only. @@ -100,6 +101,7 @@ Optional[Stdlib::Unixpath] $service_file = undef, Optional[String] $systemd_template = undef, Optional[String] $service_name = undef, + Optional[Tuple] $custom_config = undef, Optional[Boolean] $service_manage = true, Optional[String] $custom_init = undef, Optional[Integer] $uid = undef, diff --git a/templates/wildfly.systemd.conf.epp b/templates/wildfly.systemd.conf.epp index c41133ec..c80088aa 100644 --- a/templates/wildfly.systemd.conf.epp +++ b/templates/wildfly.systemd.conf.epp @@ -11,3 +11,8 @@ WILDFLY_HOME="<%= $wildfly::dirname %>" # Location of JDK JAVA_HOME=<%= $wildfly::java_home %> + +# Custom Config +<% $wildfly::custom_config.each |$value| { -%> +<%= $value %> +<% } -%>