Skip to content

Commit bb0f232

Browse files
committedJul 15, 2013
Merge pull request #252 from oxilion/proxy_set
add proxy_set option to balancer
2 parents 0128341 + c94b944 commit bb0f232

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
 

‎README.md

+6
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,12 @@ And on the proxy itself you create the balancer cluster using the defined type a
823823

824824
apache::balancer { 'puppet00': }
825825

826+
If you need to use ProxySet in the balncer config you can do as so:
827+
828+
apache::balancer { 'puppet01':
829+
proxy_set => {'stickysession' => 'JSESSIONID'},
830+
}
831+
826832
###Templates
827833

828834
The Apache module relies heavily on templates to enable the `vhost` and `apache::mod` defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

‎manifests/balancer.pp

+11
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
# The namevar of the defined resource type is the balancer clusters name.
2020
# This name is also used in the name of the conf.d file
2121
#
22+
# [*proxy_set*]
23+
# Hash, default empty. If given, each key-value pair will be used as a ProxySet
24+
# line in the configuration.
25+
#
2226
# [*collect_exported*]
2327
# Boolean, default 'true'. True means 'collect exported @@balancermember
2428
# resources' (for the case when every balancermember node exports itself),
@@ -35,6 +39,7 @@
3539
# apache::balancer { 'puppet00': }
3640
#
3741
define apache::balancer (
42+
$proxy_set = {},
3843
$collect_exported = true,
3944
) {
4045
include concat::setup
@@ -60,6 +65,12 @@
6065
# else: the resources have been created and they introduced their
6166
# concat fragments. We don't have to do anything about them.
6267

68+
concat::fragment { "01-${name}-proxyset":
69+
target => $target,
70+
order => '19',
71+
content => inline_template("<% proxy_set.each do |key, value| %> Proxyset <%= key %>=<%= value %>\n<% end %>"),
72+
}
73+
6374
concat::fragment { "01-${name}-footer":
6475
target => $target,
6576
order => '20',

0 commit comments

Comments
 (0)