diff --git a/manifests/balancermember.pp b/manifests/balancermember.pp index 7664cd13..ceaceb73 100644 --- a/manifests/balancermember.pp +++ b/manifests/balancermember.pp @@ -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, diff --git a/templates/haproxy_balancermember.erb b/templates/haproxy_balancermember.erb index 423874ab..d44602a4 100644 --- a/templates/haproxy_balancermember.erb +++ b/templates/haproxy_balancermember.erb @@ -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 -%> \ No newline at end of file +<% elsif @type == 'default-server' -%> + default-server <%= Array(@options).join(" ") %> +<% end -%>