Puppet Class: apache::package

Inherits:
apache::params
Defined in:
manifests/package.pp

Summary

Installs an Apache MPM.

Overview

Parameters:

  • ensure (String) (defaults to: 'present')
  • mpm_module (String) (defaults to: $apache::params::mpm_module)


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
# File 'manifests/package.pp', line 5

class apache::package (
  String $ensure     = 'present',
  String $mpm_module = $apache::params::mpm_module,
) inherits apache::params {
  # The base class must be included first because it is used by parameter defaults
  if ! defined(Class['apache']) {
    fail('You must include the apache base class before using any apache defined resources')
  }

  case $facts['os']['family'] {
    'FreeBSD': {
      case $mpm_module {
        'prefork': {
        }
        'worker': {
        }
        'event': {
        }
        'itk': {
          package { 'www/mod_mpm_itk':
            ensure => installed,
          }
        }
        default: { fail("MPM module ${mpm_module} not supported on FreeBSD") }
      }
    }
    default: {
    }
  }

  package { 'httpd':
    ensure => $ensure,
    name   => $apache::apache_name,
    notify => Class['Apache::Service'],
  }
}