Let haproxy_defaults be overridable

Add the haproxy_defaults_override parameter so the defaults_options
in haproxy are overridable. Tested by adding the following yaml to
the deployment:
parameter_defaults:
  ExtraConfig:
    tripleo::haproxy::haproxy_defaults_override:
      retries: 7

Observed that haproxy.conf contained the following (retries defaults
to 3):
defaults
  retries  7

Change-Id: I52b8f528e334e4d243ac7f506b9f293dab9f478d
Closes-Bug: #1732176
This commit is contained in:
Michele Baldessari 2018-01-09 10:59:29 +01:00
parent 3e1de7d72f
commit 37f0c004c5
1 changed files with 8 additions and 1 deletions

View File

@ -57,6 +57,12 @@
# [*haproxy_globals_override*]
# HAProxy global option we can append to the default base set in this class.
# If you enter an already existing key, it will override the default.
# Defaults to {}
#
# [*haproxy_defaults_override*]
# HAProxy defaults option we can append to the default base set in this class.
# If you enter an already existing key, it will override the default.
# Defaults to {}
#
# [*haproxy_daemon*]
# Should haproxy run in daemon mode or not
@ -596,6 +602,7 @@ class tripleo::haproxy (
$haproxy_log_address = '/dev/log',
$activate_httplog = false,
$haproxy_globals_override = {},
$haproxy_defaults_override = {},
$haproxy_daemon = true,
$haproxy_socket_access_level = 'user',
$haproxy_stats_user = 'admin',
@ -863,7 +870,7 @@ class tripleo::haproxy (
class { '::haproxy':
service_manage => $haproxy_service_manage,
global_options => merge($haproxy_global_options, $haproxy_daemonize, $haproxy_globals_override),
defaults_options => merge($haproxy_defaults_options, $httplog),
defaults_options => merge($haproxy_defaults_options, $httplog, $haproxy_defaults_override),
}