Puppet Function: wildfly::service_config

Defined in:
functions/service_config.pp
Function type:
Puppet Language

Overview

wildfly::service_config(String $distribution, String $version, String $mode)Hash[String, String]

Default service configuration for a specific distribution, version

execution mode and initsystem.

Parameters:

  • distribution (String)

    Wildfly distribution: ‘wildfly’ or ‘jboss-eap’.

  • version (String)

    Wildfly version.

  • mode (String)

    Wildfly execution mode will run, ‘standalone’ or ‘domain’.

Returns:

  • (Hash[String, String])

    service configuration: name, configuration file and template and bundled init scripts.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'functions/service_config.pp', line 8

function wildfly::service_config(
  String $distribution,
  String $version,
  String $mode,
) {
  case $distribution {
    'wildfly': {
      {
        'service_name'     => 'wildfly',
        'conf_file'        => '/etc/wildfly/wildfly.conf',
        'conf_template'    => 'wildfly/wildfly.systemd.conf',
        'service_file'     => "docs/contrib/scripts/init.d/wildfly-init-${downcase($facts['os']['family'])}.sh",
        'systemd_template' => 'wildfly/wildfly.systemd.service',
      }
    }
    'jboss-eap': {
      {
        'service_name'     => 'jboss-eap',
        'conf_file'        => '/etc/default/jboss-eap.conf',
        'conf_template'    => 'wildfly/wildfly.systemd.conf',
        'service_file'     => 'bin/init.d/jboss-eap-rhel.sh',
        'systemd_template' => 'wildfly/jboss-eap.systemd.service',
      }
    }
    default: {
      fail("Unsupported distribution: ${distribution}")
    }
  }
}