Skip to content

Commit

Permalink
Merge pull request #489 from cirrax/fix_add-default-server
Browse files Browse the repository at this point in the history
allow type 'default-server' for balancermember
  • Loading branch information
daianamezdrea authored Jul 6, 2021
2 parents 75958e3 + baf4711 commit ea6d51e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/balancermember.pp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
#
define haproxy::balancermember (
$listening_service,
$type = 'server',
Enum['server', 'default-server', 'server-template'] $type = 'server',
$ports = undef,
$port = undef,
$server_names = $::hostname,
Expand Down
4 changes: 3 additions & 1 deletion templates/haproxy_balancermember.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
<% end -%>
<% elsif @type == 'server-template' -%>
server-template <%= @prefix %> <%= @amount %> <%= @fqdn %><%= @port ? ":#{@port}" : "" %><%= if @define_cookies then " cookie " + @fqdn end %> <%= Array(@options).sort.join(" ") %><% if @verifyhost == true %> verifyhost <%= @fqdn %><% end %><% if @weight %> weight <%= @weight %><% end %>
<% end -%>
<% elsif @type == 'default-server' -%>
default-server <%= Array(@options).join(" ") %>
<% end -%>

0 comments on commit ea6d51e

Please sign in to comment.