diff --git a/manifests/backend.pp b/manifests/backend.pp index e111a8ac..c747a77f 100644 --- a/manifests/backend.pp +++ b/manifests/backend.pp @@ -21,6 +21,11 @@ # The mode of operation for the backend service. Valid values are undef, # 'tcp', 'http', and 'health'. # +# @param description +# Allows to add a sentence to describe the related object in the HAProxy HTML +# stats page. The description will be printed on the right of the object name +# it describes. Usefull in huge environments +# # @param options # A hash of options that are inserted into the backend configuration block. # @@ -73,6 +78,7 @@ $instance = 'haproxy', $section_name = $name, $sort_options_alphabetic = undef, + $description = undef, $defaults = undef, Optional[Stdlib::Absolutepath] $config_file = undef, ) { diff --git a/manifests/frontend.pp b/manifests/frontend.pp index 1ead5509..95c8a5cf 100644 --- a/manifests/frontend.pp +++ b/manifests/frontend.pp @@ -30,6 +30,11 @@ # The mode of operation for the frontend service. Valid values are undef, # 'tcp', 'http', and 'health'. # +# @param description +# Allows to add a sentence to describe the related object in the HAProxy HTML +# stats page. The description will be printed on the right of the object name +# it describes. Usefull in huge environments +# # @param bind_options # (Deprecated) An array of options to be specified after the bind declaration # in the listening serivce's configuration block. @@ -99,6 +104,7 @@ $instance = 'haproxy', $section_name = $name, $sort_options_alphabetic = undef, + $description = undef, $defaults = undef, $defaults_use_backend = true, Optional[Stdlib::Absolutepath] $config_file = undef, diff --git a/manifests/listen.pp b/manifests/listen.pp index bd3a4e4e..64c3a0b3 100644 --- a/manifests/listen.pp +++ b/manifests/listen.pp @@ -39,6 +39,11 @@ # The mode of operation for the listening service. Valid values are undef, # 'tcp', 'http', and 'health'. # +# @param description +# Allows to add a sentence to describe the related object in the HAProxy HTML +# stats page. The description will be printed on the right of the object name +# it describes. Usefull in huge environments +# # @param options # A hash of options that are inserted into the listening service # configuration block. @@ -103,6 +108,7 @@ $instance = 'haproxy', $section_name = $name, $sort_options_alphabetic = undef, + $description = undef, $defaults = undef, Optional[Stdlib::Absolutepath] $config_file = undef, # Deprecated diff --git a/templates/fragments/_description.erb b/templates/fragments/_description.erb new file mode 100644 index 00000000..7a27d432 --- /dev/null +++ b/templates/fragments/_description.erb @@ -0,0 +1,3 @@ +<% if @description -%> + description <%= @description %> +<% end -%> diff --git a/templates/haproxy_backend_block.erb b/templates/haproxy_backend_block.erb index dccb09ca..022e0db7 100644 --- a/templates/haproxy_backend_block.erb +++ b/templates/haproxy_backend_block.erb @@ -1,4 +1,5 @@ backend <%= @section_name %> <%= scope.function_template(['haproxy/fragments/_mode.erb']) -%> +<%= scope.function_template(['haproxy/fragments/_description.erb']) -%> <%= scope.function_template(['haproxy/fragments/_options.erb']) -%> diff --git a/templates/haproxy_frontend_block.erb b/templates/haproxy_frontend_block.erb index 718305d1..7200c9bb 100644 --- a/templates/haproxy_frontend_block.erb +++ b/templates/haproxy_frontend_block.erb @@ -2,4 +2,5 @@ frontend <%= @section_name %> <%= scope.function_template(['haproxy/fragments/_bind.erb']) -%> <%= scope.function_template(['haproxy/fragments/_mode.erb']) -%> +<%= scope.function_template(['haproxy/fragments/_description.erb']) -%> <%= scope.function_template(['haproxy/fragments/_options.erb']) -%> diff --git a/templates/haproxy_listen_block.erb b/templates/haproxy_listen_block.erb index 3c29202c..9ed6e18b 100644 --- a/templates/haproxy_listen_block.erb +++ b/templates/haproxy_listen_block.erb @@ -2,4 +2,5 @@ listen <%= @section_name %> <%= scope.function_template(['haproxy/fragments/_bind.erb']) -%> <%= scope.function_template(['haproxy/fragments/_mode.erb']) -%> +<%= scope.function_template(['haproxy/fragments/_description.erb']) -%> <%= scope.function_template(['haproxy/fragments/_options.erb']) -%>