Puppet Class: apache::mod::proxy_balancer

Defined in:
manifests/mod/proxy_balancer.pp

Summary

Installs and configures `mod_proxy_balancer`.

Overview

Parameters:

  • manager (Boolean) (defaults to: false)

    Toggle whether to enable balancer manager support.

  • manager_path (Stdlib::Unixpath) (defaults to: '/balancer-manager')

    Server relative path to balancer manager.

  • allow_from (Array[Stdlib::IP::Address]) (defaults to: ['127.0.0.1', '::1'])

    List of IPs from which the balancer manager can be accessed.

  • apache_version (Optional[String]) (defaults to: $apache::apache_version)

    Version of Apache to install module on.

See Also:



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
# File 'manifests/mod/proxy_balancer.pp', line 18

class apache::mod::proxy_balancer (
  Boolean $manager                       = false,
  Stdlib::Unixpath $manager_path         = '/balancer-manager',
  Array[Stdlib::IP::Address] $allow_from = ['127.0.0.1', '::1'],
  Optional[String] $apache_version       = $apache::apache_version,
) {
  require apache::mod::proxy
  require apache::mod::proxy_http
  if versioncmp($apache_version, '2.4') >= 0 {
    ::apache::mod { 'slotmem_shm': }
  }

  ::apache::mod { 'proxy_balancer': }
  if $manager {
    include apache::mod::status
    file { 'proxy_balancer.conf':
      ensure  => file,
      path    => "${apache::mod_dir}/proxy_balancer.conf",
      mode    => $apache::file_mode,
      content => template('apache/mod/proxy_balancer.conf.erb'),
      require => Exec["mkdir ${apache::mod_dir}"],
      before  => File[$apache::mod_dir],
      notify  => Class['apache::service'],
    }
  }
}