Puppet Function: os_config

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

Overview

os_config(String $distribution, String $version)Hash[String, String]

Default OS configuration for a specific distribution and version.

Parameters:

  • distribution (String)

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

  • version (String)

    Wildfly version.

Returns:

  • (Hash[String, String])

    OS configuration: user, group, dirname and console_log.



6
7
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
37
38
39
40
# File 'functions/os_config.pp', line 6

function os_config(
  String $distribution,
  String $version,
) {
  case $distribution {
    'jboss-eap': {
      case [versioncmp($version, '7')] {
        [-1]: {
          {
            'user'        => 'jboss-as',
            'group'       => 'jboss-as',
            'dirname'     => '/opt/jboss-as',
            'console_log' => '/var/log/jboss-as/console.log',
          }
        }
        [default]: {
          {
            'user'        => 'jboss-eap',
            'group'       => 'jboss-eap',
            'dirname'     => '/opt/jboss-eap',
            'console_log' => '/var/log/jboss-eap/console.log',
          }
        }
      }
    }
    default: {
      {
        'user'        => 'wildfly',
        'group'       => 'wildfly',
        'dirname'     => '/opt/wildfly',
        'console_log' => '/var/log/wildfly/console.log',
      }
    }
  }
}