Puppet Class: tomcat::params

Defined in:
manifests/params.pp

Overview



1
2
3
4
5
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'manifests/params.pp', line 1

class tomcat::params {
  case $::osfamily {
    'Debian': {
      if $::operatingsystem == 'Debian' {
        if versioncmp($::operatingsystemmajrelease, '8') < 0 {
          $version = '6'
          $systemd = false
        } else {
          $version = '8'
          $systemd = true
        }
      } elsif $::operatingsystem == 'Ubuntu' {
        $version = '7'
        $systemd = false
      }
    }

    'RedHat': {
      case $::operatingsystemmajrelease {
        '5': {
          $version = '5'
          $systemd = false
          $commons_logging_package = 'jakarta-commons-logging'
        }

        '6': {
          $version = '6'
          $systemd = false
          $commons_logging_package = 'jakarta-commons-logging'
        }

        '7': {
          $version = '7'
          $systemd = true
          $commons_logging_package = 'apache-commons-logging'
        }

        default: {
          fail "Unsupported release ${::operatingsystemmajrelease}"
        }
      }
    }

    default: {
      fail "Unsupported OS family '${::osfamily}'"
    }
  }

  $instance_basedir = '/srv/tomcat'
  $sources_src = 'http://archive.apache.org/dist/tomcat/'
  $system_conf_owner = 'root'
  $system_conf_group = 'root'
  $system_conf_mod = '0660'
}