1 # == Define Resource Type: apache::balancermember
3 # This type will setup a balancer member inside a listening service
4 # configuration block in /etc/apache/apache.cfg on the load balancer.
5 # currently it only has the ability to specify the instance name, url and an
6 # array of options. More features can be added as needed. The best way to
7 # implement this is to export this resource for all apache balancer member
8 # servers, and then collect them on the main apache load balancer.
10 # === Requirement/Dependencies:
12 # Currently requires the puppetlabs/concat module on the Puppet Forge and
13 # uses storeconfigs on the Puppet Master to export/collect resources
14 # from all balancer members.
19 # The title of the resource is arbitrary and only utilized in the concat
22 # [*balancer_cluster*]
23 # The apache service's instance name (or, the title of the apache::balancer
24 # resource). This must match up with a declared apache::balancer resource.
27 # The url used to contact the balancer member server.
30 # An array of options to be specified after the url.
34 # Exporting the resource for a balancer member:
36 # @@apache::balancermember { 'apache':
37 # balancer_cluster => 'puppet00',
38 # url => "ajp://${::fqdn}:8009"
39 # options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
42 define apache::balancermember(
44 $url = "http://${::fqdn}/",
48 concat::fragment { "BalancerMember ${name}":
50 target => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
51 content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),