Puppet Class: apache::mod::proxy_balancer

Defined in:
manifests/mod/proxy_balancer.pp

Overview

Parameters:

  • manager (Boolean) (defaults to: false)
  • manager_path (Stdlib::Absolutepath) (defaults to: '/balancer-manager')
  • allow_from (Array) (defaults to: ['127.0.0.1','::1'])
  • apache_version (Any) (defaults to: $::apache::apache_version)


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

class apache::mod::proxy_balancer(
  Boolean $manager                   = false,
  Stdlib::Absolutepath $manager_path = '/balancer-manager',
  Array $allow_from                  = ['127.0.0.1','::1'],
  $apache_version                    = $::apache::apache_version,
) {

  include ::apache::mod::proxy
  include ::apache::mod::proxy_http
  if versioncmp($apache_version, '2.4') >= 0 {
    ::apache::mod { 'slotmem_shm': }
  }

  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_balancer']
  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_balancer']
  ::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'],
    }
  }
}